Part Number: MSPM0G3519-Q1
Hello,
my most recent discovery of proper clockstop procedure for 3519 is the following:
DL_MCAN_txBufCancellationReq(MCAN0_INST, 0);
do {
cancellation_status = DL_MCAN_txBufCancellationStatus(MCAN0_INST);
}while((cancellation_status & 0x1) == 0);
DL_MCAN_setOpMode(MCAN0_INST, DL_MCAN_OPERATION_MODE_SW_INIT);
DL_MCAN_addClockStopRequest(MCAN0_INST, true);//CSR
while (DL_MCAN_OPERATION_MODE_SW_INIT != DL_MCAN_getOpMode(MCAN0_INST));//INIT must be set to '1' by h/w
DL_MCAN_enableClockStopGateRequest(MCAN0_INST);//STOPREQ
while (DL_MCAN_isClockStopGateRequestEnabled(MCAN0_INST) == false);//STOPREQ
do {
{
ackstatus = DL_MCAN_getClockStopAcknowledgeStatus(MCAN0_INST); //ACKSTS
}
}while (ackstatus == false);
DL_MCAN_disableModuleClock(MCAN0_INST);
this one mostly works but unfortunately not 100percent reliable, please advise.
