imxrt 1020 FlexCAN example code.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imxrt 1020 FlexCAN example code.

3,025件の閲覧回数
emb01_jtronix
Contributor II

Hi,

I am using MIMXRT1020-EVK board and interfacing CAN I run flexcan_loopback_functional example code and I am getting proper output.

But

Now I am using MIMXRT1020-custom board with chip MIMXRT1021CAG4A and interfacing CAN for trial purpose I am running  flexcan_loopback_functional example on board and code asserted at ( assert(priDiv <= sourceClock_Hz)).My CAN channel is on same port as in EVK board, I am using same crystal oscillators in my board as in EVK board but source frequency getting different. What should I check to rectify this issue?

software using :MCUXpresso IDE v11.2.1 [Build 4149] [2020-10-07]

Thank you.

 

flex1.pngflex2.png

 

ラベル(1)
タグ(1)
0 件の賞賛
返信
12 返答(返信)

2,933件の閲覧回数
emb01_jtronix
Contributor II

Waiting for reply

Thank you.

0 件の賞賛
返信

2,943件の閲覧回数
emb01_jtronix
Contributor II

Thank you for reply.

When I am working with my custom board and own software routine ESR1 is setting as 0X42252 so error bit is set and transmission is not happening what should I do to resolve this problem?

0 件の賞賛
返信

3,008件の閲覧回数
emb01_jtronix
Contributor II

Even I got sourceClock_Hz  20 MHz when I debug  the flexcan_loopback demo on MXRT1020 board but as I am using same example code with all the same configuration on my custom board why I am getting sourceClock_Hz is 1 MHz that is my concern.

0 件の賞賛
返信

3,001件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply. It seems a bit weird, so I'd like to suggest you use the CCM_CLKO1 or CCM_CLKO 2 pin to output the clock, then you can use the oscilloscope to observe the clock.

jeremyzhou_0-1615257733501.png

It can help you to check whether the clock configuration works well.
Hope it helps.
Have a great day,
TIC

-------------------------------------------------------------------------------
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 件の賞賛
返信

2,987件の閲覧回数
emb01_jtronix
Contributor II

Thanks for your reply. I am getting low state (0) on this pin.

0 件の賞賛
返信

2,975件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
It seems a bit weird, I was wondering if you can illustrate the process of configuring the clock source output via either the CCM_CLKO1 or CCM_CLKO 2 pin, it can help me to figure it out.
Have a great day,
TIC

-------------------------------------------------------------------------------
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 件の賞賛
返信

2,967件の閲覧回数
emb01_jtronix
Contributor II

Thank you,

Can you explain how to output the clock on this pin ?I just checked the signal on CCM_CLKO1.

0 件の賞賛
返信

2,962件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) Can you explain how to output the clock on this pin?
-- Please configure these two pins via the CCM_CCOSR register.
Have a great day,
TIC

-------------------------------------------------------------------------------
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 件の賞賛
返信

2,948件の閲覧回数
emb01_jtronix
Contributor II

Thank you for reply.

When I run example code (flexcan loopback transfer) on EVK board I am getting frequency as I shown in below image :

emb01_jtronix_2-1615445025151.png

But when I am using same code (flexcan loopback transfer) on my custom board I am getting bypass pll. I am getting frequency as I shown below image:

emb01_jtronix_3-1615445349746.png

Why I am getting bypass pll is there anything I have to check with my custom board(Hardware). 

0 件の賞賛
返信

2,923件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply. It doesn't make sense. According to your test, the PLL3_MAIN_CLK is from the OSC (24 M), it obvious be inconsistent with the flexcan_loopback_transfer demo (as the below figure shows).

jeremyzhou_0-1615538039053.png

 

So I'd like to suggest you check the clock diagram of the flexcan_loopback_transfer demo besides check with your custom board.
Have a great day,
TIC

-------------------------------------------------------------------------------
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 件の賞賛
返信

2,952件の閲覧回数
emb01_jtronix
Contributor II

Thank you.

But  how I configure this pin I am not getting please can you explain in detail how to configure this pins in register.

0 件の賞賛
返信

3,017件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
The sourceClock_Hz is 20 MHz when I debug the flexcan_loopback demo on the MIMXRT1020 board, so I'd like to suggest you reconfigure the sourceClock_Hz to 20 MHz again.
Hope it helps.
Have a great day,
TIC

-------------------------------------------------------------------------------
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 件の賞賛
返信