we are currently developing the firmware for our custom board with an STM32F746 MCU in LQFP-100 package. Our current version is working well and now we want to be able to download updates via USB DFU. I read many posts and the related documents from ST, so there might be some ways to realize this. Unfortunately, in either way we get stuck on choosing the right addresses or verifying code with DfuSe. My favorite way is the following in which we jump to the internal bootloader:
#define SYS_MEM_ADD 0x1FF00000
//Disables the RCC (reset setting)
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
// disables every IRQ
// remap system memory to 0x0000 0000
SYSCFG->MEMRMP = 0x01;
JumpToApplication = (void (*)(void)) (*((uint32_t *)(SYS_MEM_ADD + 4)));
__set_MSP(*(__IO uint32_t*) SYS_MEM_ADD);
The problem is that this way is just working in debug mode (toolchain SW4STM32 with Segger J-link). So my breakpoint is at JumpToApplication() and when I go one step further the device appears in DfuSe with the correct memory mapping (DFU update possible). In normal run mode the application is running and while switching to DFU/Bootloader mode the MCU just resets. I tried some different addresses but nothing would work. Maybe there is another way or something wrong in the IDE settings?
I appreciate every help. Thanks in advance!