cancel
Showing results for 
Search instead for 
Did you mean: 

Custom board works normally when attached to STlink but does not boot in standalone.

PG.1
Associate III

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!

6 REPLIES 6
Javier1
Principal

maybe you should show us your design

MM..1
Chief II

BOOT0 for start from flash need be low, when is high start system bootloader.

Connect it ti ground directly or over for example 10k.

PG.1
Associate III

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.

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
PG.1
Associate III

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.

PG.1
Associate III

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:

  • Doesn't work when powering without the STLink connection. Unplug ST link, power off,

power on -> blocked before delay. Plug the ST link -> Works. Why should a delay depend on st link?

  • As the SysTick usually work (1ms), I have setup a variable of 400, and decrement at each interrupt.

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.