2010-08-11 01:11 AM
Trouble getting the CAN error interrupt to work correctly on STM32F103VET6
2011-05-17 05:01 AM
''Also, it seems like the unit stops to retransmit the packet once TEC reaches 0x80 and the counter doesn't go any higher.''
When a transmitter is 'error passive' and detects an ACK error, it doesn't increase the transmit error count. Since you don't have another node to do an ACK then I guess this is what is happening. Are you sure it stops transmitting? It doesn't on our board.2011-05-17 05:01 AM
''Also tried to write a '0' to the ERRI bit in the CAN_MSR. register but it doesn't help.''
Write a '1' to the ERRI bit in the CAN_MSR instead.2011-05-17 05:01 AM
Tnx for the answers. Think the reference manual was a bit unclear on the 'setting bit to 1 to clear it'. Works much better now.
Been reading the Bosch specification about CAN but must have missed that the TEC should not increase for acc errors in passive mode. That explains a lot. Thank you for the reply. A follow-up question. Is there any way to reset the TEC counter back to zero from software? Or do I need to reset the controller to do that? cheers, Mikael R2011-05-17 05:01 AM
The TEC will start to decrease once the node starts to successfully transmit messages.
2011-05-17 05:01 AM
Ok, that's the only way to decrease TEC. Will have to live with that when handling the 'one unit on the bus' case. tnx.
/ M