RT1021 SAI project runs in SDRAM anomaly?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1021 SAI project runs in SDRAM anomaly?

1,242 Views
jarman_zhou
Contributor I

Hi @kerryzhou

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

0 Kudos
Reply
10 Replies

1,225 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

1,221 Views
jarman_zhou
Contributor I

Hi @kerryzhou

I used MCUXpresso. For this project, I just adjusted the position of RAM.which is  download it to the flash, and not to the SDRAM.

I just adjusted the position of RAM. Please see the picture below for the adjustment.I didn't change anything else except that.

jarman_zhou_0-1682502816396.png

 

Best Regards,

Jarman

0 Kudos
Reply

1,214 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @jarman_zhou ,

   Please refer to this link:

https://community.nxp.com/t5/Blogs/Overview-of-using-the-MIMXRT1050-EVK-B-with-MCUXpresso-IDE/ba-p/1...

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

0 Kudos
Reply

1,184 Views
jarman_zhou
Contributor I

Hi @kerryzhou

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

0 Kudos
Reply

1,182 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

1,180 Views
jarman_zhou
Contributor I

Hi @kerryzhou

Yes, it is possible to reproduce the problem on the EVK board, using the demo in the SDK.

Best Regards,

Jarman

0 Kudos
Reply

1,114 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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:

kerryzhou_0-1683187095935.png

 

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

 

0 Kudos
Reply

1,110 Views
jarman_zhou
Contributor I

Hi @kerryzhou

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‘

1.jpg2.png3.png

0 Kudos
Reply

1,108 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @jarman_zhou ,

  I will try your SDK version, please keep patient, thanks.

Best Regards,

Kerry

0 Kudos
Reply

1,142 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply