2018-10-01 02:22 PM
Hi,
I hav difficulties going to DFU mode programmatically. In the en.DM00070391.pdf
page 19, says
The embedded boot loader is located in the System memory, programmed by ST during
production
but does not specify the start address.
I tried en.CD00167594.pdf @ page 292
3 Kbyte starting from address 0x1FFFEC00
contain the bootloader firmware, but as soon (*JumpDFU)(); I go a
HardFault_Handler () at ../Src/stm32f3xx_it.c:65
65 {
uint32_t BOOT_LOADER_ADDR = ??????; 0x1FFFEC00 did not work
tmp = BOOTLOADER_MAGIC_TOKEN; // set before reset at the end of RAM
if (tmp == BOOTLOADER_MAGIC_TOKEN)
{
pFunction JumpDFU;
uint32_t JumpAddress;
JumpAddress = *(__IO uint32_t*) (BOOT_LOADER_ADDR + 4);
JumpToApplication = (pFunction) JumpAddress;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) bsaddr);
(*JumpDFU)(); // ->>>>>> void HardFault_Handler(void)
while(1){blinkErr(); /* should never get here*/}
}
2018-10-01 06:01 PM
AN2606 suggests its 0x1FFFD800, but you can inspect the memory in the debugger, and look at the values you load before you jump to them.
Clearly you'd want the initial stack pointer to actually describe a RAM address (ie 0x20000000..0x2000FFFF or whatever the range is), so perhaps check for that, and an initial PC in the same 0x1FFF???? space, and ODD