QSPI on i.MX RT 1170

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

QSPI on i.MX RT 1170

Jump to solution
403 Views
neetha_jyothish
Contributor II

Hi,

I need to configure LPSPI in half duplex 4-bit mode, because the slave device(not a flash memory) communicates via QSPI interface. I understand that to do this, I must configure LPSPI1 in half duplex mode, and set PCCFG = 1, to get PCS2 and PCS3 and D2 and D3 respectively. However, I have the following doubts:

1. How do I configure all the data lines (D0, D1, D2, D3) as bidirectional lines? I did see details about the PINCFG bit, but from what I understood, it can configure only either the SDI pin or the SDO pin as bidirectional. 

2. How do I tell my microcontroller to change the direction of the pin from output to input? For example, when sending the command word, the lines must be "output". But just before the slave sends the data, the direction must switch to "input". How can this be done?

 

Any help would be appreciated.

@DanielRuvalcaba @_Leo_ 

0 Kudos
1 Solution
363 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,


Did you mean PCSCFG instead of PCCFG?
I'd recommend you to take a look to Chapter 70 in the RM.
In section 70.5.1.15 you can find the Transmit Command Register. I believe you are probably missing some settings in this register.
Have you tried modifying the RXMSK, TXMSK and WIDTH fields?
For instance, WIDTH = 10, and if you want to read set RXMSK = 1, if you want to write set TXMSK = 1.


I hope this helps,
Daniel.

View solution in original post

0 Kudos
2 Replies
349 Views
neetha_jyothish
Contributor II

Thanks, I will try these.

0 Kudos
364 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,


Did you mean PCSCFG instead of PCCFG?
I'd recommend you to take a look to Chapter 70 in the RM.
In section 70.5.1.15 you can find the Transmit Command Register. I believe you are probably missing some settings in this register.
Have you tried modifying the RXMSK, TXMSK and WIDTH fields?
For instance, WIDTH = 10, and if you want to read set RXMSK = 1, if you want to write set TXMSK = 1.


I hope this helps,
Daniel.

0 Kudos