Closed Ananyaaynana closed 9 months ago
Did you keep the serial monitoring on while you tried to flash (espressif monitor or CuteCom)? That's not possible, as flashing uses the same serial interface.
No the serial monitor was off when flashing the code.
Ok, that's strange and I can't reproduce it here.
It is expected that the MOSFETs stay on during flashing, as the bq chip operates independent of the MCU.
From what I understood you were finally able to flash new firmware after pressing reset, right? Does it always only work after pressing reset or was this just a single time flashing failed?
No I am still not able to flash code into the board. It seems to stop flashing when trying to change the baud rate.
Does the Espressif USB JTAG appear in lsusb
?
If not, maybe something went wrong and you have to manually put the board into bootloader mode to reflash: Connect TP11 to GND and press reset or power cycle the board.
Yes it does appear in lsusb
as "Espressif USB JTAG/serial debug unit".
I entered bootloader manually by grounding TP11 and pressed the reset. I was able to flash the code successfully.
On using the
west espressif monitor
it stops at "waiting for download".
The LED's are still not on after flashing is done.
Did you disconnect TP11 from GND again?
I connected TP11 to GND, pressed reset button and used west flash
to flash the code. At this point the LED's turned off. After flashing was successful I disconnected TP11 from ground. Then I used west espressif monitor
to check the serial monitor.
I'm almost out of ideas.
Did you run west update
after updating to the new BMS firmware?
Did you see any compiler warnings?
Can you go back to the old firmware revision and successfully flash / use that?
Is the behavior the same on both boards?
Did you try to delete the firmware directory and get a clean workspace again following the steps in the docs?
I deleted the firmware directory and followed the steps in the documentation and reflashed the board and it worked. Thank you for the help.
Issue: I tried updating to the latest firmware version "v23.1-1-g55c2ea2-dirty," but encountered two issues: The red and green LEDs switch off and get the error "A fatal error occurred: No serial data received." when attempting to flash the code and the LEDs can only be turned on using the S2 button.
Steps Taken: I created an overlay file (as in https://libre.solar/bms-firmware/src/dev/customization.html) in the app folder with the following code: { chosen { thingset,serial = &usb_serial; }; }
I then built and flashed the code using the "west flash" command. When attempting to monitor the board using the "west espressif monitor" command, I encountered the following output:![Screenshot from 2023-11-10 18-45-03](https://github.com/LibreSolar/bms-firmware/assets/131510581/74a51663-5a87-4ed0-af92-2d0889056ac3)
Additionally, when I tried to flash the code again, red and green leds turn off but there is voltage at the bat+, bat-, pack+ and pack-.![Screenshot from 2023-11-10 19-11-57](https://github.com/LibreSolar/bms-firmware/assets/131510581/78cbcdb4-4ab3-429a-aaf2-ae5716753aaf)
When the leds are off the "west espressif monitor"command gives this:![Screenshot from 2023-11-10 19-18-07](https://github.com/LibreSolar/bms-firmware/assets/131510581/658a129b-8338-4551-a732-ec8b30f39d30)
On exiting the espressif monitor not able to flash code again. On holding down the S2 button the leds turn back on after blinking for a few seconds.
Any guidance on resolving these issues. Specifically, I need help with:
1) Understanding why the code flashing is not happening and why the LEDs are turning off.
Additional Information:
Board Model: Libre Solar BMS C1 (v0.3) Firmware Version: v23.1-1-g55c2ea2-dirty.