This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCAN1145-Q1: Data read-write rules when the SPICHAR=16 bit

Part Number: TCAN1145-Q1

Hey Expert,

 

Our customer has some issues with data reading.

 

The TCAN1145 datasheet recommends that for each selective wake register configured, the register needs to be read to ensure that the register configuration is successful. However, TCAN1145 reads the data returning 2 bytes.

  • I wonder if INT_flag=1 in the SPISTS register indicates that both bytes returned are received complete when configured with F280025? What is the order in which two bytes are received at the same time?
  • The case where SPICHAR is less than 16 bits is described in the F280025 datasheet, as shown in the figure. But there is no case where SPICHAR=16bit. And I wonder what happens when data is written and read when SPICHAR=16. Will the MCU receive 16 bits at once when SPICHAR=16? And Can 2-byte data on SDO be sent at once?   
  • I want to know when the data read back from SPIXBUF, if the most recent data overwrites the previous data? Or is it a shift between the most recent data and previous data?

 

Thanks a lot!

  • Hi Chloe,

    Whenever a SPI transaction is initiated to TCAN1145, the transceiver will drive the state of the Global Interrupt register on the SDO line. This will occur at the same time as the MCU is transmitting the address it wishes to read/write to on the SDI line. In a SPI read, the second byte that appears on the SDO line will be the contents of the requested register. The processor should therefore use this second byte as the expected return value. 

    See datasheet Figure 10-38 for a graphical representation of this. 

    Let me know if you have any more questions. 

    Regards, 
    Eric Schott 

  • Hey Eric,

    Now the customer does not want to configure as standard.  They set the SPICHAR register in the F280025 to 16bit. Because they want to read the valid data for the first time, not the data in the 50h register. Is this allowed? 

    If this configuration is allowed, I wonder if the INT_flag=1 in the SPISTS register means that the F280025 has received a 16bit of data.

    If the F280025 receives this 16bit data, and it has invalid data from the 50h register. So when reading valid data, should you read either high 8bit or low 8bit. 

    And I want to know when the data read back from SPIXBUF, if the most recent data overwrites the previous data? If not, I want to know the rules that the most recent data replaces the previous when SPICHAR=16bit.

    The '27.3.4 Data Format' in the F280025 Datasheet describes the data read rules when SPICHAR is configured to be less than 16-bits, but does not describe the data read rules when SPICHAR is configured to be 16 bits. So I would like to know the data read rule when SPICHARA is configured as 16-bit. 

     Thanks for support!

  • Hi Chloe, 

    There is no way to modify the SPI configuration of the TCAN1145 device, so the first byte to appear on the SDO line will always be the state of the 50h register. 

    The read byte that is used by the MCU will depend on the way that the MCU drivers order the read bytes. The data that this application is looking for will be present in the second byte that is sent in time. I am not familiar with this MCU in particular as I only support our transceiver devices. Let me know if you would like for me to transfer this post to our team that supports this MCU. 

    Regard,
    Eric Schott