cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to STM32 but application not running ?

antonius
Senior

Dear Members,

I am writing to STM32 flash but application not running ?

I reset it, it's still not responding,

any ideas ? I can read and write to the chip,

thanks

11 REPLIES 11
antonius
Senior

when I debug it, it stops at 0x08000138 4806     LDR     r0,[pc,#24] ; @0x08000154

Sounds like your application is running, just not working.

One disassembled instruction lacking any other context is not going to help here.

What are the register content, and the instruction before and after?

What routine is this code situated in?

What part?

What tool chain?

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

It's nucleo board STM32L152RE, tool chain = Keil and STLink,

I haven't checked the routine and the register content before and after that, I pull out all peripherals now and still no response, I suspect my chip is not working properly, later I'll disable all init and try only GPIO and see what happens if it is not responding, I think the chip is faulty....

Any clues ?

>> I suspect my chip is not working properly ... I think the chip is faulty....

That is perhaps the least likely of the available options..

The chip does what you tell it to do, starting at the instruction at Reset_Handler

>>Any clues ?

Turn off "Run to main()", and step it along until you understand the why/where

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

this what I got :

0690X000008AQxEQAW.jpg

the time below is ticking but nothing is happened, I tried to blink 1 LED and no response ???

ok, let's see if I 'm not running from main()

I try stepping it, it stacks in that loop...

while (1)

 {

   /* USER CODE BEGIN W1_HardFault_IRQn 0 */

   /* USER CODE END W1_HardFault_IRQn 0 */

 }

thanks for the clue, where can I find "Reset_Handler" ?

; Reset handler routine

Reset_Handler   PROC

                EXPORT Reset_Handler            [WEAK]

       IMPORT __main

       IMPORT SystemInit 

                LDR    R0, =SystemInit

                BLX    R0             

                LDR    R0, =__main

                BX     R0

                ENDP

then ?