2301602_en-US

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

2301602_en-US

2301602_en-US

FlexCAN3 stuck in freeze mode after initialization

Hi all,

I'm currently developing a driver for the FlexCAN3 module with FD functionalities. I've just run into a problem where the module doesn't exit freeze mode at the end of my init function. My init code follows the guide in 45.5.1 pretty closely, with some modifications to some of the bit settings and also doesn't enable any interrupts. Upon negating the MCR[FRZ] and MCR[HALT], it polls MCR[FRZACK] but gets stuck in the while loop forever because the bit never negates to 0. Interestingly, I also notice that the debugger can't read any of the RXIMR registers (up to the max number mailbox) as they are highlighted in red, with no numbers displayed.

Here are my register settings; settings not listed here have default values:

MCR[IRMQ] = 1, MCR[AEN] = 1, MCR[FDEN] = 1, MCR[MAXMB] = 23
CTRL1[LPB] = 1
CTRL2[TASD] = 24, CTRL2[MRP] = 1, CTRL2[ISOCANFDEN] = 1
RXMGMASK[MG] = 0
CBT[BTF] = 1
FDCTRL[TDCEN] = 1

The CBT and FDCBT regs are configured according to the input frequency, which I've checked and made sure their bit fields have the right values.

Here are my pin configs:

LamK_2-1769564802833.pngLamK_2-1769564802833.png

And here is what I'm seeing:

LamK_0-1769564648102.pngLamK_0-1769564648102.png

LamK_1-1769564755696.pngLamK_1-1769564755696.png

I also haven't connected a twisted pair of CAN cables to the connector yet, not sure if that's relevant to the issue.

I'll also share my files here in case it helps to dig through my code. This is my entry into embedded software so my coding might be unorthodox, in a manner of speaking. Lmk if I'm missing anything.

I'd appreciate it if anyone could help me.

Thank you,

Lam

i.MXRT 106xRe: FlexCAN3 stuck in freeze mode after initialization

Hi @LamK ,

Thank you so much for your interest in our products and for using our community.

1:which exact i.MX RT device are you using (for example, RT1050/RT1060/RT1170), and is this specifically FlexCAN3 ?

2: When you hit a breakpoint or single‑step with MCR[FRZ]=1, FlexCAN may stay in Freeze. Then FRZACK never clears, even after HALT/FRZ are cleared. Try running the code without stopping the debugger to see if it exits Freeze.

Snipaste_2026-04-08_17-28-13.pngSnipaste_2026-04-08_17-28-13.png

Best Regards

May Liu

Re: FlexCAN3 stuck in freeze mode after initialization

Hi again @mayliu1 ,

Thank you for responding. Fortunately, I've figured it out a while back after digging through the HAL. I simply forgot to enable the serial bus, which explained why it wasn't exiting freeze mode because the prescaler wasn't running, even though I was still able to see the registers. I can freely enter and exit the freeze mode anytime I want now.

LamK_1-1776046950593.pngLamK_1-1776046950593.png

And to answer your first question anyway, it is an RT1060X and yes it is FlexCAN3. I've been developing my own drivers instead of using the HAL so I've encountered quite an amount of problems, a few of which you have helped me with so thank you again.

Best Regards,

Lam 

Tags (1)
No ratings
Version history
Last update:
‎04-15-2026 02:53 AM
Updated by: