Skip to main content
Visitor II
October 6, 2020
Question

Application crashing when going from bootloader to application after UART

  • October 6, 2020
  • 1 reply
  • 764 views

Hi, I am writing my bootloader, I changed MSP and reset handler value correctly so code is able to got application mode.

0693W000004Ik2tQAC.png

In my application I changed VTOR value as below but still my application is getting stuck post sending data to UART.

0693W000004Ik3XQAS.png

0693W000004Ik3cQAC.png

I am using STM workbench IDE so when I try to debug application code, its erasing bootloader code so I am unable to check exact reason of failure. Any suggestion as code looks fine to me.

    This topic has been closed for replies.

    1 reply

    Graduate II
    October 6, 2020

    Get a better debugger..

    Instrument code to give flow and register info, use the SWV​.

    Use UART in polled mode.

    Determine where it "crashes", instrument Error_Handler and HardFault_Handler to see if it dies in those functions. Perhaps Default_Handler also.​

    Visitor II
    October 6, 2020

    Yes I am using uart polled mode HAL_UART_Transmit , not HAL_UART_Transmit_IT.

    Btw Did u find anything wrong in shared code images?

    Visitor II
    October 6, 2020

    @Community member​ which debugger u use ? Also seems like issue is bit different. I started sending count 1 byte in while loop. Don't know why after sending 5 times, application code is getting crashed.

    Also same result with polled mode and interrupt mode.