Hello everyone!
I thought that the CAN modules are completely independent of each other. The documentation does not mention that they are dependent. Howewer, I found the strange behavior of the CAN_B module: If I'm working with the CAN_B module only, it does not work until I call the
void CANInit(uint32_t ui32Base)
procedure for CAN_A module.
After that I found out that the problem is in the line
HWREGH(ui32Base + CAN_O_CTL) = CAN_CTL_SWR;
of void CANInit(uint32_t ui32Base) procedure.
In other words, if this line is not called for the CAN_A module, then the CAN_B module doesn't work. But if this line is not called for the CAN_B module, then the CAN_A module works properly. CAN_A module always works properly.
The question is:
Is that proper operation of CAN_B module? Why the CAN_B module does not work until the first module has been reset with Software Reset Enable Bit (SWR)?