2020-11-23 12:43 PM
Short story: the board was working fine, but now I cannot communicate with it from the IAR IDE (cannot debug/download)
Long story:
I am using the IAR Embedded Workbench IDE - ARM 8.50.6 to program/debug my NUCLEO-H745ZI-Q board.
I had successfully uploaded an example project ("ADC_AnalogWatchdog - STMH743ZI-Nucleo" - I know that the name indicates it is for a different board, but the project description says that it should still work for the STMH745ZI). I was able to interact with the user button on the board and the GPIO and user LEDs behaved as expected - indicating that the upload was successful.
However, after I picked up the board to inspect it, the user button no longer triggered the expected behaviour and the COM LED turned solid red. I uploaded the example project again, and received this error:
I assumed it was a poor connection, so I unplugged/replugged the Microusb cable, tried other cables. - same error. I played around with the STLINK drivers by uninstalling and reinstalling them, same error.
I tried a spare board: it was working fine, I unplugged it from the PC for lunch, returned to plug it back in and found that it now behaved like the previous board - COM LED solid red (instead of flashing red/green), no response from user button and other LEDs, code won't upload and gives the fatal error above.
The solid red COM LED indicates that enumeration was successful - so why can't I use the boards anymore? How do I revert the boards to a usable state?
Any direction or tips would be appreciated. Thanks in advance.
Solved! Go to Solution.
2020-11-26 08:39 AM
Solved - I believe I was locked out of the STLink because of a mismatch between the firmware and hardware configuration of the on board power supply. I was able to boot from system memory by pulling BT0 high, then perform a full chip erase in STCubeProgrammer to remove the firmware that incorrectly configures the power supply, and now I can upload other programs/firmware that contain the correct power supply configuration.
2020-11-23 03:09 PM
Furthermore, I can't connect to the board using STLink Utility:
I selected "Connect under reset" and reduced the frequency as recommended by the error message - still can't connect.
I have also tried powering the board externally - LED5 lights up as expected. I am able to power the board externally and plug the debugger into the PC with no additional issues (still can't connect). I can read varying voltages on the GPIO so I don't that any circuitry has been damaged.
Is it possible that the program I uploaded has irreversibly locked me out of the STLink connection?
2020-11-26 08:39 AM
Solved - I believe I was locked out of the STLink because of a mismatch between the firmware and hardware configuration of the on board power supply. I was able to boot from system memory by pulling BT0 high, then perform a full chip erase in STCubeProgrammer to remove the firmware that incorrectly configures the power supply, and now I can upload other programs/firmware that contain the correct power supply configuration.