2017-08-04 02:24 AM
Hi, the STM32F427 has 256KB ram.
In the file USB_Device/DFU_Standalone/Src/main.c
/* Test if user code is programmed starting from USBD_DFU_APP_DEFAULT_ADD address */
if(((*(__IO uint32_t*)USBD_DFU_APP_DEFAULT_ADD) & 0x2FFE0000 ) == 0x20000000) { /* Jump to user application */ JumpAddress = *(__IO uint32_t*) (USBD_DFU_APP_DEFAULT_ADD + 4); JumpToApplication = (pFunction) JumpAddress; /* Initialize user application's Stack Pointer */ __set_MSP((*(__IO uint32_t*) USBD_DFU_APP_DEFAULT_ADD )); JumpToApplication(); }the boot fail at the BOLD line.
If the initial stack pointer is located in a position greater than 64K the IF fail.
I think that for a microcontroller with 256KB of ram the condition shold be:
if (((*(__IO uint32_t*)USBD_DFU_APP_DEFAULT_ADD) & 0x2FFC0000 ) == 0x20000000)
Do you have any comment?
2017-08-04 03:16 AM
Hello,
You are right
Fante.Stefano
.We are aware about this issue related tothe DFU application on HAL firmware and it will fixed in coming releases.
You should update this code on the main.c of the DFU application as below:
/* Test if user code is programmed starting from address 0x0800C000 */
if(((*(__IO uint32_t*)USBD_DFU_APP_DEFAULT_ADD) & 0x2FFE0000 ) == 0x20000000)
to this line:
/* Test if user code is programmed starting from address 0x0800C000 */
if(((*(__IO uint32_t*)USBD_DFU_APP_DEFAULT_ADD) &
0x2FFC0000
) == 0x20000000)Best Regards
Imen