- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello every one
I am using XMC1403 MCU and Microchip CAN BUS Analyzer
I can see the CAN bus went into BUSSOFF state in CAN BUS analyzer
there is perfect communication between the TWO nodes (XMC1403 CAN peripheral as one Node and CAN bus Analyzer as another node) there is a 120 ohm termination also
if(HandlePtr1->node_ptr->NSR & (1<<7)) busoff();
as per reference manual xmc1400 I am checking the condition of BUSSOFF error then calling the buss off function
void busoff(void){
bus_off_count++;
if(bus_off_count == 100){
CAN_NODE_Init(&CAN_NODE_0);
CAN_NODE_Enable(HandlePtr1);
CAN_NODE_ConfigBaudrate(HandlePtr1,canbaudrate, cansample_point, cansjw);
bus_off_count=0;
}
}
then also I cannot see CAN BUS is not coming to normal mode in analyzer it seems CAN BUS Analyzer is working fine
but my XMC1403 MCU CAN node is not coming into normal state when goes in to BUSOFF state when BUSSOFF occurs I am again initializing the CAN NODE of XMC1403 MCU
Please find below Screen shot XMC1403 reference manual BUSSOFF register
regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Bandarikarthik ,
Can you put a breakpoint inside the below marked condition and see if it hits?
If yes- then is there any API like "deinit"- can you call that before init?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Alakananda_BG !!!
Thankyou for your response
yeah I'll try with keeping "CAN Deinit" API before "Init Api " .
regards,