QSPI - TC275 - Read data from register

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User15256
Level 2
Level 2
10 sign-ins 10 replies posted 5 questions asked
Hello,

In current project I need to interface the uC SPI with CAN transceiver.

The QSPI channel is working properly with all configurations, but for example when I try to use "IfxQspi_SpiMaster_exchange", where is the function going to store the data collected from the device? For example I'm trying to read register 0xFD and the data should be 0x70 or 0x74, but I don't know where the data is stored.


Does someone have any example with QSPI reading data?


Thanks for your support.
0 Likes
1 Reply
User15256
Level 2
Level 2
10 sign-ins 10 replies posted 5 questions asked
I manage to send 0xFD, and get response from the uC 0x74 which is the ID of the device TJA1145FD.

3204.attach

The problem now is, I'm using the exchange function to send/receive data:

// wait until transfer of previous data stream is finished

while( IfxQspi_SpiMaster_getStatus(&spiChannel) == SpiIf_Status_busy );

// send/receive new stream

IfxQspi_SpiMaster_exchange(&spiChannel, &spiTxBuffer, &spiRxBuffer, 2);

But for example, when I send 0xFD, the response will be empty(spiRxBuffer). And when I use the above function again with any other data, let's suppose I send 0xFF, than I have the response on spiRxBuffer.

Basically the response from the message just appears in the spiRxBuffer after sending another message.

Do you have any idea why this is happening?

Thanks so much.
0 Likes