affe00 / STM32H743_DFU_QSPI_flash

This is a ExtBoot host program with DFU programming interface on STM32H743 dev. board. The application program can be written onto QSPI flash on the dev. board, or spare memory location in the onchip flash memory.
Other
6 stars 3 forks source link

It does not seem to work properly #1

Open mtk11 opened 3 years ago

mtk11 commented 3 years ago

Tried STM32H743_DFU_QSPI_flash, got the following:

H743_Proj06: Start w/o MemMap. H743_Proj06: pin C5(K2) set.

[W25Qxx_QPI_Enable]: HAL_QSPI_Receive()=0000. REG_2=02 [W25Qxx_QPI_Enable]: HAL_QSPI_Receive()=0000. REG_1=00

W25Qxx_Init: return 0.

H743_Proj06: XIP code found. Will execute.

but, the program is not executed. As well as when try to upload a file in dfu mode, it does not write the FLASH.

affe00 commented 3 years ago

Hello,

It has been a year since I worked on this program. I'll try to answer you as I could remember.

This line looks unusual: [H743_Proj06]: *QSPI_BASE=24080000.

*QSPI_BASE shall contain a pointer to the ISR vector table of the XIP image. Therefore it shall point to 0x90000000. While 0x24080000, according to RM0433 2.3.2, is a reserved memory area. When this is not correct the program won't run.

Are you using STM32H743VITX_FLASH.ld file, the linker script, from my source code, or are you using the one generated by STM32CubeMX? The following line in that file is critical for compiling H743_Proj05_XIP_on_QSPI_Flash, for XIP on QSPI flash: FLASH (rx) : ORIGIN = 0x90000000, LENGTH = 8192K

When the compiled image does not contain data to be placed in the 0x90000000 address range, the DFU request handler routines wouldn't write the image into flash chip.

I tested my programs with DfuSe Demo(v3.0.6).

I remember STM32CubePrgrammer requires a different DFU device driver than DfuSe. I can't remember whether I was able to program the XIP image with STM32CubePrgrammer.

Regards, Affe00