|
// Enter CAN module into normal mode |
|
CANCON = 0x00; |
|
while(CANSTATbits.OPMODE==0x00); |
This needs to be:
while (CANSTATbits.OPMODE != 0x00);
The only reason it doesn't lock up the processor indefinitely as written, is because the mode switch doesn't happen instantly.
EasyCAN/software/old/xc8_test/can/ecan.c
Lines 188 to 190 in 0a382b3
This needs to be:
The only reason it doesn't lock up the processor indefinitely as written, is because the mode switch doesn't happen instantly.