I want to use SDRAM to run SAI, but it doesn't seem to work properly after modifying the memory configuration. What is the reason?
I'm using the evkmimxrt1020_sai_edma_record_playback in SDK, And adjust RAM to point to BOARD_SDRAM. The program doesn't seem to be working properly.
Best Regards,
Jarman
Hi @jarman_zhou ,
Please tell me how do you test the project in SDRAM, which IDE, share some issue screen and configuration, I will help you to check it.
Please note, when you run the SDRAM code, do you download it to the flash, or to the SDRAM directly? You need to init the SEMC for the SDRAM, if you download to the flash, you also need to use the DCD which is used to configure the SEMC.
Wish it helps you!
Best Regards,
Kerry
Hi @jarman_zhou ,
Please refer to this link:
The related document tell you how to debug the code in the SDRAM, it needs the related script file, also attached in the above link.
Wish it helps you!
Best Regards,
kerry
First of all, thank you for your reply. I can't find relevant information in the answer you provided.
In fact, in my project, it is already linked to SDRAM running, but after adding SAI related tasks, the task of reading and writing data in TDM will block.
So, I tried to change sai_edma_record_playback to run SDRAM as well and found that the program was blocking while reading and writing data.
Can you try it on your board? Modify it as I did above.
Best Regards,
Jarman
Hi @jarman_zhou ,
Thanks for your information.
So, if you run other SDK code in the SDRAM, totally works, just the sai_edma_record_playback run in the SDRAM can't work, right?
Do you also reproduce the issue on the MIMXRT1020-EVK board?
Please try to disable the cache, whether it is improved or not.
If totally the SDK and the NXP EVK can reproduce the issues, please let me know, then I will help you to test it on my side.
Best Regards,
Kerry
Hi @jarman_zhou ,
Could you please tell me which SDK version you are using now? Which debugger you are using?
Today, I am running the :
SDK_2_13_0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\sai\edma_record_playback
But I am stopping in the :
if (CODEC_Init(&codecHandle, &boardCodecConfig) != kStatus_Success)
Do you also have this issue or not? Which SDK version you are using, just want to check, whether it is my EVK issue or the newest SDK issue.
I checked the code, I find this project didn't enable the DCD which is used to configure the SDRAM, do you enable it?
If you didn't init the SEMC, then after you up the SDRAM memory, it may meet issues, or you can add the .scp with the SEMC init code if you are using the CMSIS DAP debugger.
Anyway, from your description, the issue should be related to the SDRAM is not init in the SDK project.
You can see, the original SDK code no SDRAM image:
But, when you use the SDRAM, and not configure the SEMC, then it will meet issues, so need the debugger script to init the SDRAM when debug the code.
Best Regards,
Kerry
Thank you for your reply.The version of SDK I use is SDK_2_11_0_EVK-MIMXRT1020.
If it is the default configuration in demo, I did not stop at CODEC_Init and the program will run normally.
If I switch to SDRAM and I add the macro definition of DCD, the program will stop in the loop of sending and receiving data, but will run several loops.
In addition, the same modification in my other projects can run normally,such as ’evkmimxrt1020_lwip_udpecho_freertos‘
Hi @jarman_zhou ,
we are in the May Day Vocation now, if you have any updated information, I will reply you after back to work from 5.4, thanks a lot for your understanding.
Best Regards,
Kerry