FlexSPI Flash in Read-Only Mode?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FlexSPI Flash in Read-Only Mode?

705件の閲覧回数
bennxp
Contributor III

I have the MIMXRT1060-EVK configured to boot of the NOR QSPI Flash. Everything was working fine as I was testing my program. I wanted to write to the flash, so I used the debugger (CMSIS-DAP USB tool) to run my code from ram (set "Link application to RAM") and this worked fine. I had code erase and write pages of Flash (flexspi_nor_flash_erase_sector and flexspi_nor_flash_page_program from examples) and I think something bad happened while doing this. It seems now that I can no longer write to the flash. Programs that boot to ram and are loaded via the debugger work fine, but any program that loads and boots over flash fails to do anything -- even programs that worked before or the simple hello world SDK examples.  If I execute those programs in debug mode, I don't get any error messages, but the debugger never pauses at the start of int main().  Using the NXP MCU Boot Utility v2.1.0 I can connect to the device via USB HID and I can tell it to erase the flash. But when I reboot, and read the flash with the same program, I get back the same (non-erased) data.

It is as if I have some bad flash code on the device and when I write to the flash, it claims to change the data, but it doesn't actually write anything. Is it possible to somehow get the flash into a read-only state? If so, is there some magic word that needs to be sent to the flash to take it out of protective mode? I've rebooted my board just in case that mattered.

Thanks,

ラベル(1)
0 件の賞賛
2 返答(返信)

604件の閲覧回数
bennxp
Contributor III

Ok, It is working again. I think one of the dip switches that sets it to boot from flash wasn't all the way over and so maybe it wasn't booting from flash. It is still weird that, for example, the vendor ID of the flash would be wrong when I executed code  from RAM to query that. I powered the whole board off for ~30seconds -- maybe that caused the flash to fully power-down as lose some weird setting in memory?

0 件の賞賛

604件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Ben Luey,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
According to your introduction, I suspect that it's related to the hardware, especially, the boot pins configuration.
So please use the multimeter to validate the boot pins configuration is correct.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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 件の賞賛