CAN-FD using MIMXRT1064-EVK and PCAN-View PC software

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CAN-FD using MIMXRT1064-EVK and PCAN-View PC software

跳至解决方案
2,957 次查看
paul_roberts
Contributor III

CAN-FD using MIMXRT1064-EVK and PCAN-View PC software & CAN-FD adapter from Gridconnect, MCUXpresso version 11.

The symptoms:  I cannot communicate to the PC from my eval board using CAN-FD, only basIc CAN.  The PCAN-View software reports a bus error when I send a message from my i.MX 1064 eval board.

My findings thus far:  I'm transmitting a message from my MIMXRT1064-EVK eval board to my PCAN-View software via the Gridconnect USB adapter.  The messages is CAN-FD with Bit Rate Switch Enabled.  The node Id is 0x321 Standard, payload size is set to 8 bytes, nominal bit rate is 1 Mbps, data bit rate is 2 Mbps.  The payload bytes are (in hex)  55 aa cc 33 77 88 11 ee. 

PCAN-View does not like what it sees, as it reports a "Bus Passive" error.  I tried transmitting exactly the same message from PCAN-View back to the MIMXRT1064-EVK in order to compare waveforms.  The waveforms are different, and the difference appears to be in the CRC section.  Following the payload, the MIMXRT1064-EVK appears to send out the bit pattern 1001101000100010010100010, whilst PCAN View shows 111001000100110111010.  It appears that MIMXRT1064-EVK is using CRC21 vs CRC17, which is what I believe I may be observing from my Gridconnect adapter, based on the different number of bits observed (different by 4 bits) in one vs the other.  The question is why.

I'm running the evkmimxrt1064_canfd_interrupt_transfer example.

Any suggestions are welcome!

Paul

1 解答
2,755 次查看
Takashi_Kashiwagi
Senior Contributor I

Hi Paul-san

Have you checked the following points?

  • Sampling Point
    • This value depends on your wiring environment
  • ISOCANFDEN
    • Which mode are you using, ISO or non-ISO?

pastedImage_1.png

Best Regards,

T.Kashiwagi

在原帖中查看解决方案

4 回复数
2,755 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Paul Roberts ,

   When you test the NXP SDK code:

SDK_2.6.1_EVK-MIMXRT1064\boards\evkmimxrt1064\driver_examples\canfd\interrupt_transfer

Do you modify the code? This code need to input the node_type, it will define the txIdentifier and the rxIdentifier:

pastedImage_1.png

Do you configure the SDK code?

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 项奖励
回复
2,755 次查看
paul_roberts
Contributor III

Hello Kerry,

No mod is needed, as I type 'A' on the prompt to chose 0x321 as the TX address.  I'm just using a COM port.

Cheers,

Paul

0 项奖励
回复
2,756 次查看
Takashi_Kashiwagi
Senior Contributor I

Hi Paul-san

Have you checked the following points?

  • Sampling Point
    • This value depends on your wiring environment
  • ISOCANFDEN
    • Which mode are you using, ISO or non-ISO?

pastedImage_1.png

Best Regards,

T.Kashiwagi

2,755 次查看
paul_roberts
Contributor III

Hello Takashi,

Thank you very much for pointing this out.  After you told me what to look for, I found the bit defininiton in my version 2.6.1 SDK_2.x_EVK-MIMXRT1064 from NXP, in the MIMXRT1064.h file.  I used it to create my own read and write functions, as none could be found in my version of the SDK.

1) I tested the read, creating my own function.  In my test program, I issue a printf to my debug comm poirt showing the result of the ISOCANFDEN bit setting.  Sure enough, it came back 0.

2) In my test program,. after the initial read and printf, I added a call to the EnableISOCANFD function. I then do another .read, and another printf.  Unfortunately, my write failed, as it still came back 0 on the second read.

3) Inside the Enable function., I added calls to EnterFreezeMode, and ExitFreezeMode as needed, based on the note in your posting.  Testing now showed it coming back true (1) after the second read.

4) The two waveforms explained in my original posting now lined up exactly (Note: with external CAN bus disconnected , I watch the 1064's CAN transceiver output on my LeCroy WaveRunner scope channel 2 in ZOOM mode which allows me to scroll the display on a split screen).

5) I reconnected the CAN bus to the eval board, and testing Tx and Rx from the PCAN-View software.  CAN-FD with data rate switching is now working in both directions!

Thanks Again,

Paul Roberts