FLEXSPI NOR Polling Example Questions

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

FLEXSPI NOR Polling Example Questions

1,101 Views
chadgraham
Contributor V

Hello,

I am currently using MCUXpresso 11.3.1 with the 2.10.0 SDK.  In the NOR Polling Example, there are a couple things in the code that seem like they were added purposely, but I can't find in the documentation why they were added in the first place.

  1. In the initialization function, why are the DCache and ICache disabled and enabled?
  2. What effect will resetting the bus have on a program that is XIP from the same QSPI chip?
  3. Why do the enable_quad_mode, erase_sector, flash_program, flash_page_program, get_vendor_id functions reset the FLEXSPI bus?
  4. Should erase_chip also trigger a FLEXSPI reset?
  5. Why do the enable_quad_mode, erase_sector, flash_program, flash_page_program, get_vendor_id functions call the write_enable?
  6. Does the write enable not stay enabled once it is called once?  Does it ever get disabled?
  7. Why was there a function wait_bus_busy added?  Doesn't FLEXSPI_GetBusIdleStatus() perform the same function?
0 Kudos
Reply
1 Reply

1,084 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @chadgraham 

  Answer your 7 questions:

1. In the initialization function, why are the DCache and ICache disabled and enabled?

---Answer: Please check this application note:

https://www.nxp.com/docs/en/application-note/AN12042.pdf

If you enable cache, and use the flexSPI, and other IP modules which acces the interconnect bus fabrics, it may have conflict, and need to take care the details, so disable cache make things easy.

2 What effect will resetting the bus have on a program that is XIP from the same QSPI chip?

---Answer: Do you mean you run NOR Polling Example in the external QSPI flash directly? As you know, the EVK on board QSPI flash is not the RWW chip, so if you run the code in the qspi, and also do the flash operation(program and erase), it will have issues.

So, normally, to NOR Polling Example, we recommend the customer run the code in the internal RAM, instead of the XIP.

3 Why do the enable_quad_mode, erase_sector, flash_program, flash_page_program, get_vendor_id functions reset the FLEXSPI bus?

---Answer: do the reset just for the next flexSPI command operation.

4 Should erase_chip also trigger a FLEXSPI reset?

---Answer: You can refer to the SDK, the SDK didn't add the reset for the erase chip. But I think even you add it, it's also OK.

5 Why do the enable_quad_mode, erase_sector, flash_program, flash_page_program, get_vendor_id functions call the write_enable?

---Answer: write enable used to enable the external flash write, you need to check the QSPI flash datasheet.

6 Does the write enable not stay enabled once it is called once?  Does it ever get disabled?

---Answer: You can try to disable the write enable and test it on your side.  In fact, this code won't influence the command running.

7 Why was there a function wait_bus_busy added?  Doesn't FLEXSPI_GetBusIdleStatus() perform the same function?

---Answer: it is used to check the bus is not busy, then do the next comand send to the flexSPI bus.

 

Wish it helps you !

Best Regards,

Kerry

0 Kudos
Reply