How to make an own dfu application on STM32F746G-DISCO board?
I'm trying to make own dfu application on STM32F746G-DISCO board.
I've already tested dfu function by using ST's DFU_Standalone demo example which is worked under USB device mode.
Demo example is also provided upgradable sample application which is named as STM32746G_DISCOVERY_SysTick_0x08008000.dfu.
I can upgrade this application by using DfuSeDemo.exe on windows 10 PC and It works well.
But if i made a simple led toggle dfu application, It cannot run.
In this case, i have used the same DFU bootloader. Just changed application.
Below is what i modified for dfu application
--------------------------------------------------------------------------------
1. Changed app's flash location to 0x08008000 in STM32F746NGHX_FLASH.ld
2. Changed VECT_TAB_OFFSET to 0x8000 in system_stm32f7xx.c.
the board is always running in DFU mode even if there is no error by using DfuFileMgr.exe and DfuSeDemo.exe
So i checked flash's USBD_DFU_APP_DEFAULT_ADD(0x08008000) location by using STM32CubeProgrammer.
It shows 0x20050000. Obviously, this value cannot meet in DFU bootloader's application jump condition.
/* 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();
}
Could you let me know what i missed something?
Thanks in advance,
