2019-09-17 11:25 PM
I have 2 FMC controllers on my STM32F429 design.
The two controllers works well individually. However, when I enable them at the same time, the PSRAM controller stops working and even the Keil crashes. I guess the SDRAM controller may have conflict with PSRAM controller, so I shut the SDRAM controller and LTDC/DMA2D before use PSRAM, but the issue still happns sometimes.
//shut down SDRAM related modules
HAL_DMA2D_Suspend(&hdma2d);
HAL_LTDC_DeInit(&hltdc);
HAL_SDRAM_DeInit(&hsdram1);
HAL_Delay(1000);
//use PSRAM interface to read FPGA data
memcpy(rd_buf, (uint16_t *)FPGA_DAT_ADDR, rd_bytes); --Crash here!!
//turn on SDRAM related modules again
HAL_Delay(1000);
if (HAL_LTDC_Init(&hltdc) != HAL_OK)
{
Error_Handler( );
}
HAL_DMA2D_Resume(&hdma2d);
I've set breakpoint to ensure the rd_bytes value is correct. Also, I've caputured the signal wave on the FPGA side and the result was that FPGA runs out of data but PSRAM controller still set PSRAM NE signal valid.
Can someone give me a clue on how to debug this issue? Thank you.
Solved! Go to Solution.
2019-09-17 11:56 PM
2019-09-17 11:56 PM
Erratum FMC dynamic and static bank switching?
JW
2019-09-18 04:10 PM
Thanks Jan,that's what exactly I need.