FlexSPI (RT1015) Voltage and Clock Levels

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

FlexSPI (RT1015) Voltage and Clock Levels

1,193 Views
variable_andrew
Senior Contributor I

I have the FlexSPI able to erase, read, write, read successfully on power up - but on subsequent runs (without re-powering the board), erase doesn't seem to erase the FLASH. 

After failing to erase, if i cycle power - erase works. 

Sending a RESET command to the FLASH part doesn't fix this phenomenon. 

I've noticed a few things on the scope: 

1. My SCK frequency is around 1.78MHz instead of the expected 104MHz. Could someone provide guidance on properly setting SCK frequency?

2. The SCK level ranges from 0V to 1.68V - almost like the IOs are on a 1.8V pad, but I don't see anywhere that you can specifically set 1.8V vs 3.3 V on the IOMUX CTL bits, is this something configurable? How would I get this to 3.3V?

My code is based off of flexspi_nor_polling_transfer. I'm currently configuring clock (I thought) with:

flexspi_device_config_t deviceconfig = {

    .flexspiRootClk       = 104000000, // 104 MHz

    .flashSize            = FLASH_SIZE,

    .CSIntervalUnit       = kFLEXSPI_CsIntervalUnit1SckCycle,

    .CSInterval           = 11,     //100ns -> 9.61ns @ 104Mhz ,

    .CSHoldTime           = 2,   //see RM fig 24-26: hold CS after last data read: (5 active + 5inactive)

    .CSSetupTime          = 2,  //see RM fig 24-26: CS asserted before data read: (4.6 active + 5 inactive?)

    .dataValidTime        = 0,

....

};

and I'm not using XIP, so in app.h from the : 

Screen Shot 2019-08-28 at 4.27.04 PM.png

BOARD_BootClockRUN() is also untouched (with XIP set to 0). 

BOARD_InitPins is the default except for IOMUXC_GPIO_SD_B1_05_FLEXSPI_A_DQS, which is used in internal loopback mode. 

Labels (1)
Tags (1)
7 Replies

980 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi variable_andrew ,

   1. About the erase problem

      Do you debug the flexspi_nor_polling_transfer from RAM, and add several erase, read, write code, then test it.

     Whether that works or not?

   2. SCK frequency is around 1.78MHz instead of the expected 104MHz

     Please make sure your test tool is OK, do you use the oscilloscope test it? please also share some wave about it.

   3. The SCK level ranges from 0V to 1.68V

     Do you add any pull up to 1.8v on your own board? Please also share your nand flash circuit with me.

    4. NandFlash can't support XIP, so if you want to debug it, you need to run the code in RAM.

Waiting for your updated information.

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.
-------------------------------------------------------------------------------

0 Kudos

980 Views
variable_andrew
Senior Contributor I

Hi kerryzhou‌, 

1. Yes - what I'm finding actually is:

API reads give the same data as AHB reads. 

Running repeated erases doesn't fix erase. 

Updating the value via FLASH program appears to be successful. 

API reads give the same data as AHB reads - gives back what I program, but after erase - reads back the programmed value (not 0xFF's).

2. Test tool is OK - I'm using an oscilloscope to test.

Is the above code I shared the correct place to update SCK frequency??

I had reduced the frequency there to 10MHz and it still showed the exact same 1.78MHz. 

Our scope samples at 1Gbps, 100MHz bandwidth - so well within the range to probe 10MHz

3. Our board has a direct connection from the RT1015 to the flash, no pull-ups/pull downs aside from CS:

Screen Shot 2019-08-30 at 4.43.26 PM.pngScreen Shot 2019-08-30 at 4.43.43 PM.png

4. Yes - running from RAM. The end goal is to have code stored in NAND FLASH and the on boot - the boot loader will copy the executable (code/data/ and all) to chip internal RAM. 

Thanks!

0 Kudos

980 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi variable_andrew,

   1. You said: Updating the value via FLASH program appears to be successful. 

     Do you mean, even you erase is failed, then your program still works?

    Please test this steps:

        erase->read OK or not?  (OK)-> write the specific data-> read the write data is ok or not?->erase again OK or not?

     If the erase is failed, then read the data, is it contains the previous write data or 0XFF?

  2, About the FlexSPI clock

    You modify the wrong area, your modified point is the XIP boot clock.

    If run from the RAM, please check this code:

  FlexSPI clock is 120Mhz.

pastedImage_2.png

  This is my test result in the FlexSPI_CLK_A GPIO_SD_B1_07pin.

pastedImage_3.png

So you can find my FlexSPI clock is correct.

If you are using the same SDK code configuration and run from RAM, please test it like me.

               

3. Our board has a direct connection from the RT1015 to the flash, no pull-ups/pull downs aside from CS

  I am testing the MIMXRT1015-EVK board, adesto flash:

pastedImage_4.png

Please check the flexspi_clock_init code in your side, and test it again.


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.
-------------------------------------------------------------------------------

980 Views
variable_andrew
Senior Contributor I

Hi kerryzhou‌, 

Thanks for the response!

1. FLASH test program:

  • Erase Test: Erase API call completes with no error code, but reading back doesn't read 0xFF
  • Retry Erase x10: same result as Erase Test 
  • Program Test: when programming a value into FLASH: completed w/o error code. Reading back reads the value that was programmed

2. FlexSPI Clock: Thankyou - this was helpful. Because of this - I went to the MCUXpresso -> QuickStart-> Config Tool and set up Clocks appropriately.

Since the config tool generates a new clock_config.c, I commented out the flex_spi_clock_init() call from the demo. 

Now I see a frequency near what i've selected on the scope. 

Additionally - Now I see the proper voltage levels on my scope as well. 

As this answers my original question and allows me to move forward w/ debugging via DLA - will mark as done. 
Thanks!

3. Yup, that schematic is what we used as a reference. 

0 Kudos

980 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi variable_andrew,

   Thanks for the updated information.

   And it's good to hear your FlexSPI clock also works now.

   About the FLASH test program erase problem, I think you need to provide more information. Take an example ,each erase and read out data, then we can help you to check more details.


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.
-------------------------------------------------------------------------------

0 Kudos

980 Views
variable_andrew
Senior Contributor I

Thanks Kerry, 

I've found the source of the FLASH erase problem - it's unrelated to voltage/frequency/etc, so created a new post specifically for that issue. Tagged you in there. 

0 Kudos

980 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi variable_andrew,

   Thanks for your updated information and the new question post.

   It seems you post the question in the I.MX processor community, not the I.MX RT area, so I can't see your new question in the system box.

  Maybe you need to create the new question the I.MX RT area:

https://community.nxp.com/community/imxrt 

  

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.
-------------------------------------------------------------------------------

0 Kudos