Other Parts Discussed in Thread: TCAN4550,
Hello,
I am currently investigating the TCAN4550 for my application, and I need some clarifications for how the device modes work (i.e. Normal, Standby, Sleep). I won't go into the Failsafe modes for now as I need a grasp on these first three modes first. In my setup, ma micro-controller is driving the TCAN4550 chip through the digital GPIO pins of the chip, notably the nINT and the nWKRQ pins to manage all interruptions. In this case, the nWKRQ has been configured as the Wake request interrupt.
I would like to understand the operational differences of going from Standby to Normal, and of going from Sleep to Normal. Here is my understanding :
- Standby to Normal : on a Local Wake-Up (LWU) or CAN Wake-Up (WUP) event, the nWKRQ pin will be pulled low (nINT as well, as it is a logical OR of all interrupts). In this case, the host microcontroller may simply write 0b10 into the MODE_SEL bit field of the 0x0800 register through the SPI bus, and the incoming frame will then be acknowledged by the TCAN4550.
- Sleep to Normal : a LWU or WUP event will cause the chip to automatically transition from Sleep to Standby mode. At that point, the nWKRQ pin will be pulled low (mirrored by nINT once more). In this case, the host microcontroller must fully re-configure the TCAN4550 in order to acknowledge the incoming frame.
My question then follows. If what I just explained is accurate:
How may the host microcontroller know during an interruption triggered by the nWKRQ pin if the TCAN4550 was in Standby or in Sleep mode when the LWU/WUP event occurred. I need to know how to handle the wake up as cleanly as possible, and for now it is not clear when I need to simply transition to normal through a SPI write or if I need to completely reconfigure the component.
Corollary questions:
When the device is in Standby and a WUP takes place because I am sending it CAN frames, it won't acknowledge the incoming frame right away. It usually takes the automatic re-transmission of 2-10 CAN frames (depending on transmission rate, and how the nWKRQ interrupt is handled). This is because the SPI transaction between the microcontroller and the TCAN4550 requires a read and then write of the 0x0800 register. It takes even longer if it is handled through the nINT interrupt, as it becomes necessary to read the interrupt registers to find out if it is indeed a Wake event that needs to be handled.
Is there a way to make this acknowledge slot happen faster other than increasing the speed and efficiency of the SPI communication ?
Thank you for your help.
Best regards,
Louis
