Question
STM32 Code update through in built CAN Bootloader
Hii Everyone
I saw this post about software jump to DFU Bootloader.
typedef void (*pFunction)(void);
pFunction JumpToApplication;
uint32_t JumpAddress;
HAL_RCC_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0; /** * Step: Disable all interrupts */
__disable_irq(); /* ARM Cortex-M Programming Guide to Memory Barrier Instructions.*/
__DSB();
__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH(); /* Remap is bot visible at once. Execute some unrelated command! */
__DSB();
__ISB();
JumpToApplication = (void (*)(void))(*((uint32_t *)(0x1FFF0000 + 4))); /* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t *)0x1FFF0000);
JumpToApplication();
void (*SysMemBootJump)(void);My scenario: I am trying the same using above code snippet of jump but i want to use CAN Bootloader
Observation:
- When i perform jump to system bootloader, and after pausing debugger, i see the stack pointer is executing instructions in system flash bootloader area.
My question:
- Does this observation tells the jump was succesful and bootloader is waiting for CAN frame on Rx pin?
Another Scenario: I am assuming the jump was succesful based on observation, So
- Now i am sending CAN ACK frame as described in AN2606 from another MCU to can bus
NOTE:CAN BAUD RATE: 125kbps, NODES:2, COMMUNICATION: Verified
- After sending can frame i get transmission error for same frame.
- And the mcu the one who did jump to bootloader genearates reset.
My question:
- Any idea where i am doing wrong or any help you can provide
THANKS
