2021-04-07 05:41 AM
Hello!
I guess most of the problem is described in the title. I made a board using a STM32F767 chip. It works well when attached to STLink, can be debugged and programmed, communicates well by SPI and so on. But once detached from STLink, it doesn't boot at power up.
This chip has only a Boot0 pin, which is high. I also verified that NRST is high, The ST link connection uses a 10 pin connector from a mini STLink V3.
Sometimes the board boots by simply attaching STLink V3 mini. I tried to touch any of the pins of the STLink connector, start with pins at 0 or 1 at startup, no way to make it boot.
Does anybody know what could be wrong?
Any hint welcome.
Thanks!
2021-04-07 08:25 AM
maybe you should show us your design
2021-04-07 09:36 AM
BOOT0 for start from flash need be low, when is high start system bootloader.
Connect it ti ground directly or over for example 10k.
2021-04-07 07:42 PM
Hello!
Thanks for your reply. I was wrong, I checked and Boot0 is indeed 0. Just in case, I changed it and
the debugger attempts to access something else and gets lost, so tha't right, 0 is the only possible
solution here. That said, it doesn't solve the problem.
I checked the JTAG connector when connected and when not connected. The electrical levels are
the same.
I have checked the nucleo 144 schematics and everything seems to be right.
One question: there is a JTAG_TRST pin. What is it used for? as it can also be port B4, I don't think
it's crucial for my problem, but just in case...
So basically if Boot0 is properly configured, what could go wrong?
Thanks for any hint.
2021-04-07 07:52 PM
You need a valid Vector Table at 0x08000000
Strong chance your code is executing and FAILING.
Instrument Hard Fault Handler and Error Handler routines.
Initialize GPIO or UART in startup.s as close to Reset Handler as you can, and then signal checkpoint events as it gets deeper into your code,
Make sure ALL clocks you are using are explicitly enabled, don't rely on the debugger.
2021-04-08 12:09 AM
Hello!
Thanks for your reply. In this case, I will add a few LEDs to check what point has passed and what point has
failed / is never reached. In this case, I will not use debugger and get some hints about what's going on...
I will come back soon.
2021-04-12 05:40 AM
Hello!
I used the LEDs to check what's wrong and found out that what's blocking the whole system is a
HAL_Delay(); statement. I tried to replace HAL_Delay by a for loop, still the same. It works fine with
the debugger, it doesn't work in standalone.
The delay is used in the setup of a display (EVE4 display).
Some odd things:
power on -> blocked before delay. Plug the ST link -> Works. Why should a delay depend on st link?
But when setting the variable, it hangs the same way, and similarily as in other cases, works only
when STLink is plugged.
By the way, the very same code works with IAR compiler. But as the code is a bit too big for the free
version, I have switched to STM32CubeIDE.
Any hint welcome.