Hi,
We are using Halcogen v 3.6.0 to generate low level drivers for our project.
We are using CAN1,2 and 3 just to use the RX and TX pins as GPIO.
We found a strange behaviour: CAN1 and CAN2 work as expected, whereas CAN3 not so, as it turns out that the pins are in functional mode and not in GPIO mode.
I have found a root cause for the difference, but nothing with regard to any sensible explanation.
The difference between CAN3 and the others comes from the generated code.
At the end of the canInit() function, the following instruction is executed:
/** - Leave configuration and initialization mode */
canREG3->CTL &= ~(0x00000041U);
The same is not performed for CAN1 and CAN2.
So it begs the following questions:
- why aren't CAN1 and CAN2 placed in normal mode ?
- why placing CAN3 in normal mode cause its configuration to revert from GPIO to functional mode ?
Thanks,