Issue with upgrading my Hub/Controller

Hi Zach and Paul,

In relation with my Carbon and ESC upgrade, which was successful except not getting info from the ESCs anymore, I tried to update the firmware of my HUB and Controller (my unit is batch 4).

Fistly, I have not been able to update my controller:
* Bossac finds the Arduino Zero, but cannot upload any data to it (it just sits there doing nothing).
* The openPPG configurator does not find the controller
* When I opened my controller, I cannot find any bootload reset button.
I am out of idea as to how I can update the controller…

Secondly, I saved the HUB.bin 1.1 on a 4GB Fat32 microSD, and switch power on. The Red LED comes on, and after a few seconds the Green LED status light start flashing. I power off after about 30s, but the file HUB.bin is still on the SD card…

But worse of all, since trying to update the HUB I cannot arm my system anymore. The controller itself arms, but nothing happens on the HUB (beep beep sound carried on). Is that because the HUB got updated, but not the controller? (version mismatch)

Do you have some tips to help me figure out what is wrong? (Could I have bricked the hub? how would I know if that is the case?)

P.S: Is it possible to download the original HUB.bin 1.0 somewhere?

Thanks in advance,
Tony

The openPPG configurator only works with later revisions that include tinyUSB support so thats probably why it wont show up.
Did you try using the Arduino IDE?
You may have better luck if you set it up to flash as Adafruit M0 Feather Express vs Arduino Zero
The reset button isnt present on batch 4 because it didnt ship with the UF2 bootloader, just the standard Arduino one.
There are pads exposed for the reset button that would make it easy to add if you want.

For you I might suggest getting https://www.digikey.com/product-detail/en/segger-microcontroller-systems/8.08.91-J-LINK-EDU-MINI/899-1061-ND/7387472
It will make it simpler to debug the controller and update the bootloader to work with the config tool.

1 Like

Thanks Zach, I will try to update the sketch with Arduino IDE.
Otherwise, is it possible to get a copy of HUB.BIN 1.0, in case I cannot update the controller?
(and also, what is the corresponding github revision?)

Zach, I was able to update the controller. As expected, there is a new page in the sliding menu.

However, arming the controller still does not arm the Hub.

So next, do you have some suggestion on how I can make sure that the HUB reads the HUB.bin file? Everytime I try, the HUB stays on red LED for 4-5 seconds, then goes into blinking green LED. However, the file is not deleted from the microSD card. I am using FAT32, and only have the 1 file. Should I use another particular format for the card?

(PS - I have ordered a J-LINK, it should arrive next Wednesday)

Hey Zach,

Today I received the J-Link EDU Mini. It came with tiny cables that will connect to the controller’s programmer, but nowhere on the HUB (reading back, I see that you recommended the Mini for the controller).

Since I was able to update the controller, what is holding me back is programming the HUB. Can I use the EDU mini as programmer there too? Do you have a quick guide on how where I should connect wires to and from? (I am assuming that I should be connecting to the DEBUG port, but can’t find pin-out info).

(P.S; Just in case, I placed an order for a cheap ST-Link USB programmer: https://www.amazon.co.jp/HiLetgo®-2-piece-Current-Constant-Voltage/dp/B01MDLO0UT/ref=sr_1_fkmr0_1?dchild=1&keywords=st-link+v+2.1&qid=1590469994&sr=8-1-fkmr0)

Thanks in advance,
Tony

As noted in the readme for the controller firmware I just use an STM Nucleo board to flash the hubs. I have flashed the J-Link software to a Nucleo board to act like a J-Link debugger and that worked so I assume you can just get a breakout board for the J-Link EDU mini you already have. The important thing is the wire connections match up.


Here are the pinouts for the debug header:
From bottom to top/ left to right:

N/C
NRST
SWDIO
GND
SWCLK
3.3v/VREF
1 Like

Thanks for the pinout, I did not realize it was written on the HUB itself (font must be really tiny).
I will try out tonight and see how it goes.
P.S: I assume that HUB should be powered when I try program it, correct?

It’s not ha thats just from the board drawing.
And yeah you can just power it with normal 5v power.

1 Like

OK. One last quick question, these are the default settings of J-Link. Anything I should change?

Good news to report!

I could make an ugly little cable. After figuring out that SWD interface should be used, I managed flash the program and restore arming functionality (phewww, I upgraded my unit back from brick to airvessel).

I can also Debug the software (awesome that!) so I am gonna try to figure out (the brute way, with an HEX editor) what data the 100A ESCs send back (if any). I will report again soon.

Hmmm, here is what I found so far: When starting the program, I get a single packet from each ESC that is 100 bytes long, consisting of 0s. After that, no further packets are received.

Does the program shut transmission to the ESCs in case no good packet is received first time?

Good to here that you got it flashed!
What happens when you arm the ESC? With the other ESCs you get more packets when the ESC is armed vs just sitting idle.

I tried arming/disarming, and get no packets at all.
The only packet I get is the initial one (filled with zeros), immediately after starting the program in Debug mode.

Hmm you might have to contact them to see whats up with the firmware spec.
I assume you have it all hooked up correctly. I know there can be other status wires for warnings