flexspi flash读写失败

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

flexspi flash读写失败

Jump to solution
4,910 Views
1150666288
Contributor II

硬件:mcu:rt1010       flash:w25q32fvzpig

          我的板子外接了一个nor flash w25q32 ,但是我通过flexspi操作flash读写,运行FLEXSPI_SoftwareReset时,会进入硬件错误。可能的原因是什么?

          我的程序在rt1010中已经可以正常运行。附件是用配置工具生成的.mex文件。

参考例程:SDK_2.6.0_EVK-MIMXRT10\boards\evkmimxrt1010\driver_examples\flexspi

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
4,636 Views
jeremyzhou
NXP Employee
NXP Employee

Hi ,

从现象来判断,现象可能与硬件连接有关,但是从你的回复来看,代码可以在w25q32执行,又与前面的结论矛盾了。

你有在尝试过将整个代码运行在RAM中去读写w25q32吗?

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

View solution in original post

0 Kudos
Reply
11 Replies
4,636 Views
jeremyzhou
NXP Employee
NXP Employee

Hi 志成 项 ,

非常感谢使用NXP产品,很高兴为你提供技术支持!
查看过mt.mex 文件发现,连接w25q32的引脚与MIMXRT1010开发板是一样的,可以排除硬件方面的问题。
而根据你的描述,‘’运行FLEXSPI_SoftwareReset时,会进入硬件错误。‘’,我想知道的是在运行例程哪一个flash操作函数时出错呢?
同时,我建议你使用逻辑分析仪抓取信号分析一下,这样会给我们很多的信息来分析问题所在。

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

4,636 Views
1150666288
Contributor II

hi zhou:

         我任然没有解决这个问题。同时我发现在我的板子上直接运行SDK_2.6.0_EVK-MIMXRT10\boards\evkmimxrt1010\driver_examples\flexspi此工程,也会有类似的问题。是哪里出了问题?

        具体的函数和调试信息可以见下图。

0 Kudos
Reply
4,636 Views
jeremyzhou
NXP Employee
NXP Employee

Hi 志成 项 ,

感谢回复,我并没有你所说的具体函数和调试信息图。

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 Kudos
Reply
4,636 Views
1150666288
Contributor II

nxp-flash1.pngnxp-flash2.png

      3.png

        在单步调试时,运行到flexspi-clock-init,之后立即会退出调试。以上是出问题的具体信息。有任何需要,可以随时联系我。

0 Kudos
Reply
4,636 Views
jeremyzhou
NXP Employee
NXP Employee

Hi 志成 项 ,

这个测试是在你自己的板子上运行的,QSPI Flash是w25q32吗?

根据截图,代码其实已经可以在QSPI运行了,只是运行flexspi_nor_polling_transfer工程代码时出错了,你有尝试将工程代码运行在RAM中执行吗,如果有的话,也会碰到类似错误吗?

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 Kudos
Reply
4,636 Views
1150666288
Contributor II

0529.png

hi

   我尝试将相关函数放在ram中执行,但也会有同样的问题。

0 Kudos
Reply
4,636 Views
jeremyzhou
NXP Employee
NXP Employee

Hi 志成 项 ,

感谢回复。

1) 这个测试是在你自己的板子上运行的,QSPI Flash是w25q32吗?

2) 请问上面的函数放在RAM中执行,只是将上述函数进行转移呢,还是整个工程都是在RAM中呢?

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 Kudos
Reply
4,636 Views
1150666288
Contributor II

hi!

     1.是的,在我自己的板子上运行的,qspi flash是w25q32.

     2.只是将上面的函数放在ram中执行。

0 Kudos
Reply
4,637 Views
jeremyzhou
NXP Employee
NXP Employee

Hi ,

从现象来判断,现象可能与硬件连接有关,但是从你的回复来看,代码可以在w25q32执行,又与前面的结论矛盾了。

你有在尝试过将整个代码运行在RAM中去读写w25q32吗?

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 Kudos
Reply
4,636 Views
1150666288
Contributor II

hi

      我在程序中去除flexspi_nor_flash_init(),并关闭所有的中断。此时flash的读写都正常。我想知道,如果我要操作flash,关闭中断是必须的吗?

这对我的程序逻辑有较大的影响。

0 Kudos
Reply
4,636 Views
jeremyzhou
NXP Employee
NXP Employee

Hi 志成 项,

感谢回复。

1)如果我要操作flash,关闭中断是必须的吗?

-- 不是必须,但是建议关闭全局中断,以排除干扰。

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 Kudos
Reply