AnsweredAssumed Answered

Unable to communicate with UJA1169TK/F/3Z by Flexio_SPI

Question asked by haifeng lu on Mar 17, 2020
Latest reply on Mar 18, 2020 by haifeng lu

Hi, guys!


I am testing the UJA1169TK/F/3Z and my MCU is S32K146(64 pins).

The 1169 is configured in Forced Normal mode in the factory.  Therefore, I can now use the CAN communication even if I do not configure 1169. These have been debugged and passed on my board.


But when I use flexio_SPI to read the status of 1169, the return is always 0.

I know that in the SDK "sbc_uja116x_driver.c"  use LPSPI by default, but I can only use the flexio SPI on my board.

So, I made some changes based on the SDK.


My expert component is configured as follows:



MOSI : flexio 5 = PTE 11

MISO : flexio 4 = PTE 10

CS : flexio 6 = PTE 4

SCK : flexio 7 = PTE 5




Some related code in my project:


status = FLEXIO_DRV_InitDevice(INST_FLEXIO_SPI1, &flexIODeviceState);

status = FLEXIO_SPI_DRV_MasterInit(INST_FLEXIO_SPI1, &flexio_spi1_MasterConfig0, &flexIOSPIState_Master);


uint8_t regData;

status = SBC_DataTransfer(SBC_UJA_IDENTIF, NULL, &regData);


In the "SBC_DataTransfer()", I replace the "LPSPI_DRV_MasterTransferBlocking()" with "FLEXIO_SPI_DRV_MasterTransferBlocking()"



Below is the debug result:


From the datasheet, these registers should be readable:

Although the read returns are successful, the results are all zero.


My environment is:

S32 Design Studio for ARM Version: 2.2

SDK 3.0.2


Please give me some advices.