Tool/software:
I am encountering some erroneous behavior during configuration and communication using the MCAN module.
The MCAN module configuration setup in my application follows the general setup sequence found in the example projects for mcan (such as mcan_ex7_classic_transmit.c), specifically the MCANConfig function. However, after calling MCAN_setOpMode(MCANA_DRIVER_BASE, MCAN_OPERATION_MODE_NORMAL), I am not seeing the MCAN_CCCR.INIT bit transition from 1 to 0. I am waiting at least 11 consecutive clock cycles for the register field to update per the manual and it still does not update accordingly.
Consequently, when I try to initiate a message transmission, the MCU fails to do so. Specifically, when I write to MCAN_TXBAR indicating a buffer add request, I see that the MCAN_TXBRP register updates to 1 for the buffer I am trying to send the message out on, but the applications just hangs at this point because the MCAN_TXBRP bit never gets set to 0 indicating that the message was transmitted. I am assuming that this is related to the issue encountered above where INIT is not getting reset as well.
Additional Info: The clock source used is the peripheral system clock and this is divided down to a 40MHz for the MCAN clock.
Couple of questions:
- Has the behavior with the MCAN_CCCR.INIT bit ever been seen before? Is there any other process interacting with the INIT bit that would be holding it to 1 despite my application writing it to 0?
- Is there a reason why the message in the transmit buffer would not be sent out once the MCAN_TXBRP bit is set for that associated buffer?