The CAN example and how to properly make it work
Question 1: When I make the mcanconf like described in AN the second mcanconf is named exact the same, it does not autoincrement to mcanconf1 as it is in the example. Is that important? Or how/when do I link a certain mcanconf to a subsystem? They must be linked somehow, or? (My mcanconf1 also does not work when I set it up myself, that's why I ask)
Question 2: The code looks like this:
returnvalue = can_lld_transmit(&CAND2, CAN_ANY_TXBUFFER, &txf);
osalThreadDelayMilliseconds(1);
if (returnvalue != CAN_MSG_OK) {
for (;;) {
}
}
So if I have a error on my CAN transmission the program will be endlessly trapped in the for loop?
Isn´t the automatic resending of invalid frames/messages handled by the transceiver? Or does it have to be taken care of here in the sending call? Or is this just an example for loop that should throw an error? -> I thought of handling that one with the error callback.
Question 3: Maybe the answer is already in Q2 but, having a CAN line open or disturbed for some seconds will end the the transmission completely. It will not start again. So I wonder what I am forgetting. My expectation is that the program tries to send CAN endlessly until some other node starts acknowledging and everything's runs normal. But as it comes I would need to rewrite the program in the debugger to get it working again.
THX



