BossHobby / QUICKSILVER

Flight Controller Firmware
MIT License
165 stars 39 forks source link

ESC firmware corruption during settings write with esc-configurator #76

Open regularexpression opened 1 year ago

regularexpression commented 1 year ago
  1. Flashed Bluejay with the help of esc-configurator.com on Jhemcu gsf405a aio (Betaflight was installed).
  2. Flashed QuickSliver on flight controller.
  3. Tried to change motor direction with the help of esc-configurator.com.
  4. Three of four esc disappeared.
  5. Reflashed Betaflight.
  6. Blheli configurator could see all four esc but with corrupted firmware. corrupted-esc-example
  7. Force reflashed to blheli_s with Blheli configurator.
  8. All four esc appeared in esc-configurator.com.

This was tried 2 times.

bkleiner commented 1 year ago

what QS version did you run? 0.9.5?

regularexpression commented 1 year ago

yes

bkleiner commented 1 year ago

does not appear to be a general issue, i just ran through a couple of scenarios. might be related to the JHE board somehow. those don't have the best track-record.

regularexpression commented 1 year ago

I'll try to investigate this problem more this week.

voyn238 commented 1 year ago

A similar thing happened to me with my Mobula 7 1S ELRS on their X12 board. ESC 2 got wiped out and it took me a bunch of tries via different methods to get BLHeli_S back on it, and then re-flashed to BlueJay. Scary! I thought my board was toast.

bkleiner commented 1 year ago

Please keep me up-to-date if you were able to gain more insight into what is happening here. I can't seem to reproduce the issue with boards i have on hand here (crazybee, bfpv elrs, matekf405).

regularexpression commented 1 year ago

Sorry for the delay. Had less time then expected. Just tested four different crazybee_f4_elrs(x12, elrsf4 2g4, diamond and superbee), one crazybee_f4 (crazybee f4 pro + external elrs on uart) and two Jhemcu gsf405a(with different gyros). All AIOs were powered by power supply with fixed voltage 4.0v (not battery). Problem randomly appears only on jhemcu, but this time I can flash them via esc-configurator.com. Problem appears only when QuickSilver flashed (v0.9.5, v0.9.5dev, v0.8.5-dev were tested). With Betaflight v4.4.0 flashed problem doesn't appear (reflash from QS to BF and vice versa was done several times). According to my observations during "Connect" button click in esc-configurator.com something goes wrong (not correct sound from esc). Clipboard01

regularexpression commented 1 year ago

Also want to note that Jhemcu gsf405a and superbee f4 have the same esc S-H-50.

regularexpression commented 1 year ago

And maybe someone with GOKU Versatile F405 1-2S 12A (FLYWOOF405S_AIO) could try to repeat the same steps, because this FC is very similar to jhemcu.

banyaszg commented 1 year ago

I don't know whether there is a connection but in the case of my Beta F4 1S serial ELRS if I load the ESC info in the QS configurator, then it won't work. I receive only corrupt info. But for me the ESC works well. (QS 0.9.5, ESC A-X-5, BJ 0.18.1)

regularexpression commented 1 year ago

I've checked Betafpv f4 1S 5a aio (Spi elrs) on QS 0.9.5 (esc o-h-5) - no issue.

bkleiner commented 3 weeks ago

i might have come across something. previously QS would feed the blheli response bytes as they came to the usb serial port, which, depending on the current state of the usb buffer, could lead to some time passing between bytes. this might cause false positives on the esc timing out during the flash operation https://github.com/BossHobby/QUICKSILVER/commit/074f1b54b83287e88649fc5f3150daad5cfb1377

i have now introduced some additional buffering which makes it so that the response is always sent in one go. if for nothing else, that seems to make the esc configurator much quicker to load the settings.