STM32F769i-Disco -Moving working memory to SDRAM, HAL_GetTick() returns 0
I am creating a project that will run Azure RTOS and GUIX App. Due to the size of GUIX, the SRAM is not large enough to run the application. I was looking to use STM32H747i-Disco which has enough RAM, but it was a little too complex and the support drivers are a mess. The STM32F769i-Disco is a simpler board to work with, which I have been able to get working. I am working from the ground up and testing some basic concepts before adding Azure RTOS to the mix.
The first step was to get the LCD work. Following the project here: https://github.com/STMicroelectronics/STM32CubeF7/tree/master/Projects/STM32F769I-Discovery/Examples/LCD_DSI/LCD_DSI_CmdMode_DoubleBuffer I was able to adapt the project to get the LCD work. The sample messages, drawings, and picture appear on the LCD screen.
The next step is to move from SRAM to SDRAM. Adapting this project: https://github.com/STMicroelectronics/STM32CubeF7/tree/master/Projects/STM32F769I_EVAL/Examples/FMC/FMC_SDRAM_MemRemap. The recommendation is to have the SDRAM remapped to 0x60000000 so it is not XN section per PM0253. I put the frame buffer to 0x60400000 so it is away from working RAM. . I am using TIM6 for a Time base sources for when Azure RTOS will be added to the project. Note: If I leave the timebase to systick, the application crashes on the call to HAL_Init();
I have been able to get the system up and running to a point.
When the call is made to MX_DSIHOST_DSI_Init(), way down in the HAL code is a call to HAL_GetTick(). The value return is always 0 (uwTick), thus the code gets stuck in an infinite loop and never returns from the function call. It appears uwTick is not getting updated.
If I leave everything in SRAM and step through the code, HAL_GetTick() returns an expected value (uwTick) and everything is working fine. The move to SDRAM kills something, somewhere.
What am I missing? Where do I need to look to diagnose why uwTick is not getting updated? I have not found much information about this topic other than the example and this post :https://community.st.com/t5/stm32-mcus-products/how-to-run-a-program-in-sdram-on-stm32h743/m-p/262615
Any insights would be helpful.
