Wrong check of CAN Low Power mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wrong check of CAN Low Power mode

473 Views
Daan
Contributor III

Hi,

We're using the RT1064 MCU with SDK 2.12.1. I think the MCU is not set correctly with the current SDK when using the function `FLEXCAN_EnterFreezeMode()`. In errata ERR009595 page 10 the following is listed:

`3. Poll the MCR register until the Low-Power Mode Acknowledge (LPMACK) bit in the MCR
is cleared (timeout for software are implementation is two CAN bits length).`

However, the function is implemented as follows:

/* Step3: polling LPMACK. */
u32TimeoutCount = (uint32_t)FLEXCAN_WAIT_TIMEOUT;
while ((0U == (base->MCR & CAN_MCR_LPMACK_MASK)) && (u32TimeoutCount > 0U))
{
    u32TimeoutCount--;
}

After the loop, u32TimeoutCount is always set to 0, indicating the timeout has expired. The check should be `while ((0U != (base->MCR...`

 

Regards,

Daan

0 Kudos
Reply
1 Reply

431 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, thanks for taking an interest in NXP products, I appreciate the report, let me scale this.

Best regards,
Pavel

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply