Image

Tips: Updating DFC3’s software

Three months without TW560 taken its toll on me. No long therapeutic drives across Switzerland’s beautiful landscapes. No tinkering with my TWIKE to keep it in tip-top shape.

After working really hard for a few weeks, I decided to take a day off from work and asked Andreas from Ksenotek if I could take on his offer to borrow his TWIKE – he happily agreed to give it to me for the weekend.

Just a few minutes after setting off with Andi’s TWIKE, I noticed that the controller was running a 7-year-old version of DFC’s software. Many of the goodies were missing – above all the display screens I had contributed which are geared towards making long-distance driving comfortable and informative.

I messaged Andreas if he would be OK with me updating the software and taking care of some other smaller problems with the vehicle. He gladly agreed (which is a very strange situation: you’re fixing your mechanic’s vehicle…)

Some day I will write an entry why a TWIKE needs to have a DFC3.0 to be complete. Any TWIKE without it – even the newest ones – are missing out on comfort and safety!

Back to the TWIKE I want to update: TW716:

Hello there!

Hello there!


 

I start the controller just to double-check if everything is nominal.

Our starting point for today

Our starting point for today


 

In order to get to the controller, we need to remove the battery cover behind the seats.

WARNING!
By opening the battery cover of a TWIKE you are exposing yourself to the risk of death by electrocution! Do NOT go ahead without knowing what you’re doing. DC voltages of 400V+ are not trivial!

Metal cover instead of the usual wooden one - nice.

Metal cover instead of the usual wooden one – nice.


 

With the cover off, it is clearly visible that this is a well-kept vehicle. No dirty tangles of old cables – everything is new and orderly. I’ve seen much, much worse (…this includes TW560!)

Super simple and clean AK rail setup

Super simple and clean AK rail setup


 
If we dive in a little more, we can see the main addition to an original TWIKE: the DFC3.0. It adds an extra data-rich and future-proof layer over the existing controller whilst being able to physically disconnect the batteries every time the TWIKE is turned off. No fussing about with physical key switches and gradual discharges due to battery management leftovers from NiCd configurations. shrugging

DFC3.0

DFC3.0


 
Going even closer, all the real magic happens on this little board. The SD card logs all relevant data every second. I have around 1GiB of Data (around 8 years of TWIKE life) and will someday take the time to dive into this data trove.

DFC3's main CPU from NXP, CR2032 for RTC

DFC3’s main CPU from NXP, CR2032 for RTC


 
This board hasn’t gotten the TW560-post-India update yet – The upper PCB is not tethered to the main board. If the board comes loose, your TWIKE will start acting very strangely…Luckily, repairing this problem is easy – I’ve described how to do it here.

Piggy-back PCB with logging module

Piggy-back PCB with logging module


 
Time to dive into the TWIKE and set up my workspace! πŸ™‚

My workspace within TW716

My workspace within TW716


 

Welcome to my lair :)

Welcome to my lair πŸ™‚


 
The red connector on the smaller PCB is a TTL UART which gives me full access to the main CPU. Since this connector is non-standard and my PC doesn’t have a RS232 interface, I had to come up with a solution…

Very basic, but it works

Very basic, but it works


 
TTL > RS232 > USB: Time to connect DFC3.0 to my computer.

Dreifels Controller DFC3 - connected to my computer

Dreifels Controller DFC3 – connected to my computer


 
As a non-Windows user, there are certain programs that don’t exist in versions other than Windows which I have to run in my non-networked fully contained Windows virtual machine. NXP’s programmer is one of these pieces of software.

Virtual machine needs access to the serial port

Virtual machine needs access to the serial port


 
With my programmer able to see the serial port – we’re ready to configure the programmer.

Correct configuration is essential!

Correct configuration is essential!


 
Not configuring the programmer correctly can brick the CPU …and your TWIKE – be careful!

With this done, we’re ready to start updating!

TW716 - digital anesthetic is active. Alive but not responsive

TW716 – digital anesthetic is active. Alive but not responsive


 
This process will take around 5-7 minutes – image file verification, writing of image and re-reading it again.

During this time, you will see the serial communication indicator on your serial port on most of the time.

Serial LED shows serious comms are going on

Serial LED shows serious comms are going on


 
Thankfully, NXP’s programmer application shows in detail what is going on.

Work in progress

Work in progress


 
It’s always interesting to see the display panel react differently to the data being passed on to the CPU as during this time, there is no LCD update-routine taking care of the screen.

Deep thought

Deep thought


 
If everything goes well, NXP’s programmer app will show you this result:

All done, time to reset the controller

All done, time to reset the controller


 
After finishing the update process, it is important to reset the controller via 2 service commands – this will have it to do a hard-boot and read all configuration data again. Otherwise your TWIKE will act very strangely indeed! πŸ™‚

Let’s check the controller after a hard reboot:

Mission accomplished

Mission accomplished


 
30 minutes worth investing! Again, as soon as I have some time, I’ll write a little more about the DFC3.0. Questions? Reach out to me.