Is the SDRAM on the 1020 EVK broken?

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

Is the SDRAM on the 1020 EVK broken?

2,966 Views
brianellison
Contributor II

I have been unable to read or write from the SDRAM on the 1020 EVK.  I haven't even been able to read it using the memory window in MCUXpresso. 

I started my project with the sai example code from the SDK.  When I used that example on the 1050 EVKB, the SDRAM was fine, but the SDRAM has not worked on the 1020 EVK with that or any other example from the SDK. 

Is there an update coming to the SDK or EVK to fix this ?  If the SDRAM should be working, please let me know what I need to do.

Thanks.

P.S. - I am on rev 2.4 of the SDK, and version 10.2.1 with MCUXpresso

Labels (2)
9 Replies

2,305 Views
brianellison
Contributor II

It looks like the 1020 EVK SDRAM won't work with a Segger Jlink Jtag debugger. (mine is an ultra+ )

With the 1050 board, I've been using the Hyperflash boot option, but there isn't documentation about that for the 1020, so I ended up trying everything I could including all the different dip switch combinations. The SDRAM never worked with the Jtag. When I tried the LinkServer connection to debug, everything works fine. It's slow, but at least its working.  I'm booting with the dip switches set to 0010 for QSPI flash, but other settings may work too.

0 Kudos
Reply

2,305 Views
rshipman
Contributor V

Hi Brian,

You wrote:

"When I tried the LinkServer connection to debug, everything works fine."

I'd really love to know how you managed to get that to work. I've been using the iled_blinky demo: I set XIP_BOOT_HEADER_DCD_ENABLE=1 and ran it (because I couldn't see a way to get the DCD code to compile in using MCUXpresso settings). I can see the dcd set at 0x600010xx etc (although tbh I had expected to see that at 0x2010xx), but I cannot debug 0x80000000 etc. I'm using the Rt1020 EVK and SDK with MCUXpresso and debugging via the debug USB port using LinkServer. The demos run fine out of the box, but I just cannot get SDRAM to initalise for the life or me. Or at least I cannot get the debugger to read it. I just get question marks. What have I missed?

Any help would be greatly appreciated.

Kind regards

Ronnie

0 Kudos
Reply

2,305 Views
brianellison
Contributor II

@rshipman 

I'm not sure if I ever tried the blinky demo. I was using the SAI demo, so you might want to see if that works for you.

I was just going over my notes and it looks like I could use the LinkServer and access SDRAM without problems. Hopefully the demo will for you too.  That was slow, but when I got that jlinkScript, I could run it with JTAG and that was a lot faster. 

Later when we were trying to do more with the board, we ran into other related issues with using flash and SDRAM at the same time.  We're on the 1050 board right now and it seems to have similar issues..... still working through it. Here is my coworkers notes on the subject for the 1020 board. Hope this helps :

`evkmimxrt1020_sdram_init.jlinkscript` is a jlink script file that NXP provides in their demo projects for their MIMXRT1020EVK dev board that scripts the JLink debugger to configure the sdram prior to downloading code into the sdram.

This is problematic for a couple reasons:
1) It seems to interfere with operation of the spi flash. The spi flash doesn't seem to work after this script executes. It seems that NXP thinks you'll use the spi flash and sdram mutually exclusively.
2) The iMXRT1020 boot rom is supposed to configure the sdram via the DCD if it exists. However, the debugger seems to skip this part. Possibly the reason NXP provides the script in the 1st place. Thus, the sdram is not guaranteed to be configured the same whether booting from rom or debugger.

The above issues have been addressed in the code by copying a small section of startup code/data to internal ram, executing from internal ram to configure the sdram (among other things), and then proceeding with normal code/data ram loading and execution. Thus, the jlink script file should no longer be necessary.

0 Kudos
Reply

2,305 Views
Yuri
NXP Employee
NXP Employee

Hello,

   Please try to run "evkmimxrt1020_sdram_init.jlinkscript" initialization script from the SDK 

before application load. 

Regards,

Yuri.

2,305 Views
brianellison
Contributor II

That fixes it.  JTAG and SDRAM working well together now.

Thanks

2,305 Views
Yuri
NXP Employee
NXP Employee

Hello,

 

   SDRAM should be initialized before using. Look at the following 

Community thread https://community.nxp.com/message/1072321 

 

Have a great day,

Yuri

 

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer

button. Thank you!

0 Kudos
Reply

2,305 Views
brianellison
Contributor II

I had already verified the sai demo app I am using from the SDK is initializing the SDRAM using dcd_data from “evkmimxrt1020_sdram_ini_dcd.c”.  The SDRAM pins have also been initialized in the same way as the 1050 SDK did.  ( the SDRAM on my 1050 evk works fine with the SDK demo apps. )

 

Please be clear. Are you saying the SDK demo apps need additional work in order to use the SDRAM on the 1020 evk?  

 

Thanks

Brian

0 Kudos
Reply

2,305 Views
Yuri
NXP Employee
NXP Employee

Hello,

 

  I tried my i.MX RT1020 EVK board regarding external memory and found it working.

Memory, starting from 0x8000_0000, can be read and written. Perhaps

the issue with non-working memory concerns the fact, that memory initialization

is implemented as DCD table. This table is interpreted by boot ROM during boot.

So, if one, using debugging technique, loads and run code directly to (internal)

memory (without boot ROM), the external memory is not initialized.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

2,305 Views
brianellison
Contributor II

It DOES look like I am not running out of the boot rom, but I have no information on how to fix that.  The SAI example my code is based on does have dcd_data[] to initialize the SDRAM, but I set a memory breakpoint and it looks like that is never being read.  With the 1050 EVK, the dcd_data[] IS read by code at 0x2020EF and the SDRAM is fine.  ( also started with the SAI example from the SDK. ) Both the 1020 and 1050 project include XIP libraries.

On the 1020 Evk board, I have the dip switches set to boot from QSPI flash. ( 0010 ).  I found the RT1020_BriefOverview_v100.pdf that describes how to set this to boot from QSPI, but there is only info about settings for boot from QSPI and SDCard.  ( If I'm understanding this right, my 1050 board is booting from HyperFlash. Dip settings = 0110.  I don't see any project settings that suggest the hyperflash is being used though.  I use this setting to debug with Jtag.) 

Can you please be specific on what I need to do to boot properly? 

When you tested your EVK board, and the SDRAM worked, what were your dip switch settings? Are you using the Linkserver connection or JTAG to debug?  Was your code from the SDK?  It would be great if you could give me a specific SDK example that I could recreate here.

Thanks

0 Kudos
Reply