i.MX502 CSPI Master: Receive data in polling or interrupt

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

i.MX502 CSPI Master: Receive data in polling or interrupt

Jump to solution
610 Views
norishinozaki
Contributor V

Hello Champs,

My customer is trying to receive data using CSPI in Master mode.

First they tried to use "Poll XCH bit" to read RXFIFO, however the read data is not what they expected.

Then they try to use "wait for TC interrupt", the data is read correctly.

Could you explan why "Poll XCH bit" doesn't work as expected?

The settings are 24bit CLK and 8bit data length, XCH is ON.

Best regards,

Nori Shinozaki

Labels (1)
0 Kudos
Reply
1 Solution
523 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Nori Shinozaki,

You may either Poll XCH or wait for the TC interrupt. However, the SPI Exchange Bit (XCH). This bit applies only when the block is configured in Master mode (MODE = 1). Are you using this mode? If so this bit would be cleared automatically when all data in the TXFIFO and the shift register has been shifted out.

View solution in original post

0 Kudos
Reply
1 Reply
524 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Nori Shinozaki,

You may either Poll XCH or wait for the TC interrupt. However, the SPI Exchange Bit (XCH). This bit applies only when the block is configured in Master mode (MODE = 1). Are you using this mode? If so this bit would be cleared automatically when all data in the TXFIFO and the shift register has been shifted out.

0 Kudos
Reply