RT1020-EVK SDK flexspi/flash demo does not work?

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

RT1020-EVK SDK flexspi/flash demo does not work?

1,319 Views
rshipman
Contributor V

Hi,

I'm trying to run the evkmimxrt1020_flash_component_nor SDK demo on the RT1020-EVK, and I get a hardfault. See attached screenshort of MCUXpresso IDE.

The demo is unchanged from default.

The RT1020-EVK is unchanged from out-of-the-box.

The hard fault occurs in the call to FLEXSPI_SoftwareReset.

It seems to me that the problem might be that the demo is running from flash XIP and is also manipulating the FlexSPI interface. Later on it will also erase the flash chip. So I'm struggling to understand how this demo ever worked running XIP. Was it originally developed to run from SRAM or SDRAM perhaps?

Many thanks for your help.

Labels (1)
0 Kudos
6 Replies

1,141 Views
rshipman
Contributor V

I changed the properties:

Link application to RAM

Moved SRAM_ITC up.

The demo runs from ITCM and works ok.

0 Kudos

1,142 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi rshipman,

  Thanks for your interest in NXP MIMXRT product, I would like to provide service for you.

  The flexSPI project in the SDK need to run in the internal RAM, you can't do the XIP directly.

   As you know, MIMXRT1020 don't have the internal flash, it will use the flexSPI interface to run the code in the external flash, but if your external flash can't support the RWW function, then when you do the related flash operation during you running the code in the external flash, it will cause the hardfault problems. That's also why you can run it ok in the internal ITCM.

   So, when you run the SDK flexSPI project, please run it from internal RAM instead of XIP.

Wish it helps you!

If you still have questions about it, please kindly let me know.

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,143 Views
rshipman
Contributor V

Hi Kerry,

Thank you for your answer. The flash part on the RT1020-EVK is the IS25LP064A. Do you know if this supports RWW? And if so, how do I configure my software etc to use that mode please?

Regards,

Ronnie

0 Kudos

1,143 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi rshipman,

  The offical EVK on board flash can't support the RWW, that's why I suggest you run the flexspi code from RAM, we also run it from RAM.

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,143 Views
rshipman
Contributor V

Hi Kerry,

Thanks again for the answer. Yes I have run that demo from SRAM and it works fine.

So just to be clear, when running code XIP, I can still read from flash, but not write to it? Is that correct?

Kind regards,

Ronnie

0 Kudos

1,143 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi rshipman,

  Yes, you are right, not write and erase.

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------