S32K148 - FLEXIO SPI instance breaks normal SPI and I2C communication

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

S32K148 - FLEXIO SPI instance breaks normal SPI and I2C communication

135 Views
Poley
Contributor V

Hi all,

 

I am using a S32K148 (FS32K148HAT0MLQT) and using all 3 SPI instances, both I2C instances and a FLEXIO SPI instance to emulate a 4th SPI line. The SPI lines are for 2x BCC instances (Share Tx, seperate Rx) FLEXIO is for a UJA1169ATK and the 2xI2C for temperature sensors.

I have 3 SPI instances all dedicated to my 2x MC33664's. 2 Rx SPI channels and for each instance and 1 Tx channel which is shared with both just with different CSB.

SPI0 - Rx BCC instance 0:
MISO - PTB3
SCK - PTB2
CSB - PTB5
 

SPI1 - Tx BCC instance 0+1:
MOSI - PTB16
SCK - PTB14
CSB1 - PTA6 (Instance 0)
CSB2 - PTA16 (Instance 1)

SPI2 - Rx BCC instance 1:
MISO - PTE16
SCK - PTE15
CSB - PTA15

My UJA1169ATK is setup using FLEXIO pins to emulate a 4th SPI line using:

MOSI - PTE10 (FXIO_D4)
MISO - PTD1 (FXIO_D1)
SCK - PTE11 (FXIO_D5)
CSB - PTD3 (FXIO_D7)


I2C instance 0:
SDA - PTA2
SCL -  PTA3

I2C instance 1:
SDA - PTD8
SCL -  PTD9

 

So I have noticed that when the FXIO SPI instance is initialized and running then I2C instance 1 stops working (Line always stays high at 5v) and the second BCC instance stops working so most likely SPI2.

 

I have attached a model showing the issue with I2C when FLEXSPI is active. For some reason this only starts happening when the UJA1169 is put into normal mode. The I2C line seems to work ok before then but then stays high after that and returns a STATUS_BUSY - 0x002 error.

 

Any help with this would be greatly appreciated!

0 Kudos
Reply
1 Reply

68 Views
Poley
Contributor V

Would anyone be able to help with this? It must be somehting to do with priorities or something coliding?

0 Kudos
Reply