FlexCAN Reset Stuck

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

FlexCAN Reset Stuck

959 Views
brycer
Contributor I

Hello,

I am having a problem with the FlexCAN module on our MIMXRT1060-EVK evaluation board. When using the MCUXpresso IDE with the board's SDK and C, after creating a project and setting up the CAN peripheral and routing the pins (See below for configuration screenshots) the program that is created runs and compiles but it gets stuck in the "Wait until FlexCAN reset completes" loop of the fsl_flexcan.c file (See code snippet below). 

Thank you all!

/* Assert Soft Reset Signal. */
base->MCR |= CAN_MCR_SOFTRST_MASK;
/* Wait until FlexCAN reset completes. */
while (0U != (base->MCR & CAN_MCR_SOFTRST_MASK))
{
}

pastedImage_1.png pastedImage_3.png

pastedImage_4.png

pastedImage_5.png

Labels (1)
Tags (2)
0 Kudos
3 Replies

776 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bryce Readyhough ,

  I have a question, do you test the official SDK code which is located in this folder:

 SDK_2.6.2_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\flexcan\

 I run the flexcan_interrupt project, and even didn't connect the other CAN node, I didn't stop at the reset point which ou have mentioned:

pastedImage_1.png

So, I think you can test the official SDK project at first, if the SDK project works, then we can check more detail in your own created project.


Have a great day,
Kerry

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

776 Views
brycer
Contributor I

I just ran the official SDK project and it ran with no issue. 

0 Kudos

776 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bryce Readyhough,

  Before you do the CAN operation, please add this code , then test it again on your side:

CLOCK_EnableClock(kCLOCK_Lpuart1);

  Do you still have the problems?

  If your own project still have problems, I think you can copy the official code to your own project, and test it again.

Wish it helps you!

Any updated information, just let me know.


Have a great day,
Kerry

-------------------------------------------------------------------------------
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