AnsweredAssumed Answered

STM32L151 code that only runs correctly from an SWD/IDE reset and run

Question asked by julian on Jun 15, 2015
Latest reply on Jun 16, 2015 by julian
Hey there,

I'm having interesting times with an STM32L151 programming via a nucleo board's integrated SWD debugger (from CooCox ide..... using arm mbed platform too if that helps..) 

I'm in the interesting position where I've imported some code into my project (initially from an 8051 based project - to setup and configure an Si4463 radio chip) and what happens is, if I use SWD debugger to reset the chip then run the code, it works great... BUT.. if the processor is power cycled, hard reset using the reset pin, or even clobbers itself with the watchdog timer and restarts, then this imported code no longer works right... (the application still runs, just the SPI connected radio IC doesn't get setup right..) 

Never seen anything like this before - and until today I'd assume SWD reset and run should be the same as a power up or hard reset or watchdog reset... but it's obviously not.. Can anyone explain the differences at the chip level for me? I'm hoping to be able to get this code running right for any reset type, without too much more pulled out hair..

thanks!

Outcomes