Hello,
I am trying to write an Autosar CanTrcv driver for the TI TCAN 114x CanFD transceiver and it is not clear to me which SPI clock frequency can be use during SLEEP mode?
In the datasheet/reference manual (revision SLLSF80A – OCTOBER 2019 – REVISED DECEMBER 2020) it states that the maximum SPI clock frequency during SLEEP mode is 10kHz. In contrast to all the other modes where SPI clock can be up to 4MHz:
In Autosar it is not so easy to switch between different SPI clocks, so in a first attempt I tried to operate the device with 1 Mhz consistently. Then I repeated the same test with 4MHz SPI clock. And the strange thing is that it seems to work (in both cases). Do you know how that can be?
For now I have only tested it only on a TCAN1145 with die version 1.6 (TCAN1145EVM evaluation module).
The SPI settings I used are the following (SpiBaudrate 1Mhz and 4Mhz):
In my test I do following steps:
- Initialize CAN transceiver (actively writing following register values)
- MODE_CNTRL=0x04
- WAKE_PIN_CONFIG=0x04
- PIN_CONFIG=0x0
- DEVICE_CONFIG_2=0x0
- SDO_CONFIG=0x0
- INT_ENABLE_1=0x60
- INT_ENABLE_3=0x80
- SWE_DIS=0x84
- FSM_CONFIG=0x01
- Read INT_2 register and clear PWR_ON if set
- Read INT_1 register and clear
- Then I put the transceiver into SLEEP mode by writing the MODE_CNTRL register to 0x1
- From then on every 1000ms registers 0 to 9 (the device_id array index is the register offset) are read. The result is always as depicted below and in my opinion correct
I also checked the SDO pin of the TCAN1145 and visualized the signal coming out of the TCAN1145 and it looks perfectly ok to me.
1MHz:
Blue: SCLK Red: SDO during read of register 0 (result 0x54)
Is that section in the datasheet specifying 10kHz SPI clock in SLEEP mode wrong, or is it coincidence that it works with higher SPI clock frequencies or is there another reason I don’t understand?
Looking forward to your response.
Regards,
Peter Wais