Associate III
December 2, 2023
Solved
Cannot read ID from external flash (OSPI1) on STM32H735-DK
- December 2, 2023
- 3 replies
- 3444 views
Hello all,
I was trying to follow the example in MOOC - STM32H72x/3x hands-on workshop - 6 Code execution from external FLASH
I have configured the OSPI as per the board requirements in CubeMX. But the `OSPI_Init()` function fails while trying to read the device ID.
When I comment out the code, I am able to jump to an external application that is loaded by the CubeProgrammer.
I am not sure what is going wrong here. Can somebody help?
I have attached the project as a 7Z file.
OSPI_Init();
OSPI_MemoryMap();
printf("Device will jump to: %X\r\n", IMAGE_DEFAULT_ADD);
if ((((*(__IO uint32_t *) IMAGE_DEFAULT_ADD) & 0x2FFC0000) >= 0x20000000) && (((*(__IO uint32_t *) IMAGE_DEFAULT_ADD) & 0x2FFC0000) <= 0x2FFC0000))
{
/* Jump to user application */
JumpAddress = *(__IO uint32_t *) (IMAGE_DEFAULT_ADD + 4);/*address +4 is an reset vector*/
JumpToApplication = (pFunction) JumpAddress;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t *) IMAGE_DEFAULT_ADD);
JumpToApplication();
}
The main looks similar to the one in the MOOC video.
I believe that the GPIO configuration is correct because I am able to jump to the external application located at OSP1_BASE.
