cancel
Showing results for 
Search instead for 
Did you mean: 

i am using stm32l4 mcu when i power the mcu , my code hang on startup. when i reset the mcu it's works normally?

Rmajj.1
Associate II
 
4 REPLIES 4
TDK
Guru

Code could be stuck in initialization of an external device somewhere that isn't yet fully powered up.

Attach a debugger and see where it's stuck. This can be done without resetting the chip.

Going to be hard to solve without giving us any details.

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

Custom board design?

Is BOOT0 pulled LOW?

Perhaps you need a better POR circuit design?

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

thank you clive1

yes it is custom board design board only

#define OB_BOOT0_FROM_OB     ((uint32_t)0x0000000)        /*!< BOOT0 taken from the option bit nBOOT0 */

#define OB_BOOT0_FROM_PIN     ((uint32_t)FLASH_OPTR_nSWBOOT0)   /*!< BOOT0 taken from PH3/BOOT0 pin */

i will chek the por circuit design

thank you tdk