cancel
Showing results for 
Search instead for 
Did you mean: 

Issue starting my microcontroller in my own design.

ARamí.1
Associate II

Dear all,

I´m using the BlueNRG-LP microcontroller and STLink-SETV3. My firmware works perfectly in the Steval-IDB011V1 DK.

I´m using BlueNRG-LP-X-Flasher Utility v4.1.0 to program the microcontroller through the STLink-SETV3 programmer and I can program the microcontroller in my own design using UART or SWD. SWD sometimes fails because of an error (It's not possible to connect to the device).

When I have to connect the STLink to my board the microcontroller starts after reset but if I disconnect the SWCLK the microcontroller stops and I don’t know why.

If I connect the pin SWCLK to GND in my board the firmware starts again.

Do I need to configurate these pins if I don’t use them as GPIO?

Do I need to make any other configuration to solve this?

Thanks, an advance. 

2 REPLIES 2
TDK
Guru

You don't need to configure these pins. It sounds like there is a hardware problem. Are you able to share the schematic?

> SWD sometimes fails

It shouldn't. Chase this problem down by verifying power rails. Make sure your wiring can support whatever SWD frequency you're using.

If you feel a post has answered your question, please click "Accept as Solution".

Make sure things like the BOOT0 pin are pulled low (or other option byte setting), to ensure YOUR code is executed.

Look at the basis of your code, if it matches the expected start address and the vector table is set correctly.

Make sure you explicitly turn on all clocks and pins you're using. Don't rely on side-effects of the debugger setting things up it needs working.

Chip is probably running, either the system code, or yours. If it dies in places like Error_Handler() or HardFault_Handler() has something more helpful than a while(1) loop to understand you're there.

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