We are using Aurix TC3xx microcontroller and NXP FS65XX SBC for our project work.
We have the following requirement:
a) When the Microcontroller is ON CAN communication should be enabled.
b) When Microcontroller puts SBC to LPOFF mode, CAN should be OFF.
c) When there is a wakeup event on CAN channel, SBC shall wake up Microcontroller and resume Normal CAN communication.
Help us to understand which configuration is correct for implementing CAN wakeup functionality using the SBC CAN Trcvr.
1. Configure SBC CANTrcvr with CAN Mode as 11 mode (Normal Mode) during SBC initialization, for enabling the CAN communication (TX and RX). And before SBC goes to LPOFF mode ( During the Microcontroller ShutDown stage), configure the SBC CANTrcvr with CAN Mode as 10 mode (Sleep/Wakeup capability). Once the wakeup event on CAN occurred, configure the CAN mode to 11 for enabling the normal CAN communication.
2. Configure SBC CANTrcvr with CAN Mode as 10 mode (Sleep/Wakeup Capability) during SBC initialization and automatically CAN communication is started. Microcontroller puts the SBC to LPOFF mode. And when there is a wakeup event on CAN, SBC comes out of LPOFF mode and SBC will restore CAN mode initial configuration (10 ->Sleep/Wakeup capability) and normal CAN communication resumes.
Thanks,
Abhinand D
Hello @JozefKozon
Thanks for the clear response.
I have a follow up question:
If I don't want to put SBC in LPOFF and still turn on and off CAN transceiver when required, Can I put it in Normal mode (11) and Sleep mode(00) respectively and achieve CAN transceiver ON & OFF?
Thanks,
Abhinand D
Hello Abhinand,
yes, you can change the CAN_MODE [1:0] bits in the CAN_LIN_MODE registers during the SBC normal mode operation. There are some registers which can be changed only during the initialization phase, but not the CAN_LIN_MODE register. Please refer to the section 12.1.5 and to the Table 19. in the FS6500-FS4500 datasheet.
With Best Regards,
Jozef
Dear Abhinand,
Please make sure you have chosen the FS65 type with the CAN interface. Please refer to the Table 1. and Table 2. in the FS6500-FS4500 datasheet attached.
Please refer to the section 12.9.1.2 in the FS6500-FS4500 datasheet. If you want to have the CAN transceiver enabled in the normal mode and have the wake up capability through CAN transceiver in the sleep mode, you need to set the CAN mode bits to 11 during the initialization. If the CAN mode bits are set to 11, in the LPOFF mode the CAN mode bits will be automatically set to 10.
With Best Regards,
Jozef