Writing to STM32 but application not running ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 12:43 AM
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
- Labels:
-
Flash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 12:49 AM
when I debug it, it stops at 0x08000138 4806 LDR r0,[pc,#24] ; @0x08000154
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 5:39 AM
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?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 8:57 PM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 9:46 PM
>> 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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 10:30 PM
this what I got :
the time below is ticking but nothing is happened, I tried to blink 1 LED and no response ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 10:32 PM
ok, let's see if I 'm not running from main()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-11 10:38 PM
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 */
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-12 1:15 AM
thanks for the clue, where can I find "Reset_Handler" ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-12 1:24 AM
; 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 ?
