iMXRT1170 FlexSPI bus for generic SPI communication

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iMXRT1170 FlexSPI bus for generic SPI communication

431 次查看
violkvas
Contributor I

Hello,

I need to use FlexSPI2 bus on my iMXRT1170 for generic SPI communication with another completely different device. From looking around, this seems to be possible since the type of communication I will be doing only requires transmission one way at a time. However, I have no clue where to start writing a driver for this. I am using Zephyr in my project but I have not found a driver for this purpose and some older threads on the Zephyr project seem to agree and have voiced that there should exist NXP drivers for this purpose. If there are drivers and I have missed them, please point them out.

I have looked at the flexspi_nor_polling_transfer example, but I can't quite make out how I would initiate a write or read operation. I've found recommendations against this idea and to use an LPSPI bus instead, however, this is not an option as the only routed signals on my board are the FLEXSPI2 signals. Similarly, the posts I've found recommending LPSPI instead of FLEXSPI haven't given any points on how one would create a driver for this. The device I'm trying to communicate with is also an off-the shelf product which I cannot reprogram to act as a flash-memory.

To conclude, I am a bit lost in this process and some pointers on where to start would be highly appreciated.

Thank you in advance.

标签 (1)
0 项奖励
回复
1 回复

365 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

FlexSPI can be used as standard SPI(master mode). The 1bit mode is the called regular SPI mode. Unfortunately, we don’t have any guide as the purpose of this module is to interface external memories.
For an example of the use of regular SPI the RT600 has one use on the octal flash examples.
MIMXRT685\boards\evkmimxrt685\driver_examples\flexspi\octal\polling_transfer demo, flexspi_nor_enable_octal_mode() function in flexspi_octal_polling_transfer.c. regular SPI mode is used in this function to access flash register.
As the FlexSPI is very similar to the one on RT1170 it can be used as reference.

Best regards,
Omar

0 项奖励
回复