S32K118 EVB use sample code flexcan not work

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

S32K118 EVB use sample code flexcan not work

940件の閲覧回数
Twokey
Contributor II

Hello,

Board: S32K118 EVM

Code: sampl code        S32DS.3.5\S32DS\software\S32SDK_S32K1XX_RTM_4.0.1\examples\S32K118\driver_examples\communication\can_pal

Issue: flexcan not work (Tx not transmit data, Rx not received data)

We are trying to interface an external Can emulator with S32K118 EVB. 

This emulator has two can ports and we combine to these 2 ports to a high speed can network (ISO 11898-2)。

The HW block diagram is as following:

Twokey_0-1692941668440.png

 

We use a Saleae LA to monitor the signal for can network.

We found the signal can be detected when data is sent or received by emulator.

Twokey_1-1692942248341.png

 

We try to use sample code "can_pal" to send the can data,

Its signal cannot be detected by LA.  

The can_pal sample code is no modfied.

Is this architecture correct for can bus test?

Could you help us to fix this is issue.

Thanks

0 件の賞賛
返信
6 返答(返信)

930件の閲覧回数
Twokey
Contributor II

Hello, 

the attched sample code is in here.

Thanks.

Twokey

0 件の賞賛
返信

917件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Just a reply after a quick look:
Do you have 12V power supply through J16?

For more detailed information, please refer to file:///C:/NXP/S32DS.3.5/S32DS/software/S32SDK_S32K1XX_RTM_4.0.1/doc/html_S32K118/can_pal_s32k118_gr...

By the way, I recommend S32DS v3.4+ S32K1 SDK RTM 4.0.3. According to the currently available information, we don’t have any plan to integrate S32SDK S32K1XX 4.0.3 into S32DS 3.5 or above version.


Best Regards,
Robin
-------------------------------------------------------------------------------
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 件の賞賛
返信

880件の閲覧回数
Twokey
Contributor II

Hi, Robin

Thanks for your valuable information.

I forget to provide BAT(J16) voltage to S32K118 EVB. 

The can signals will be sent from EVB after either the BTN0 or BTN1 is pressed.

Thanks

0 件の賞賛
返信

841件の閲覧回数
Twokey
Contributor II

Hi, Robin

   We try to test the Can bus Tx part of can_pal sample code,  

The system configuration of can bus is the same as previous and bit rate setting is the same as sample code (500kbps).

The smallest preiod of Tx signal is about 2us,  if the data is sent by using can emulator.

We found the smallest period seems 1us, when can bus signal sent by EVB.
During this time, LA has detect an signal error.

Fig. 1 is the overall signals of can bus.

Fig1.a and Fig. 1.b are the zoom in of leftside and rightside parts of Fig.1, respectively.

We found the signal of Fig. 1.b has 1 us period, marked by red rectangule.

We just modify the define of TX_MSG_ID, Rx_MSG_ID, and disable the CAN_Receive() function form the can_pal sample code,

we also put this test code in the attachment.

Could you help us to take care this iisue.

Thanks,

 

Twokey_1-1693459096750.png

Fig. 1, Can bus signal measured by LA,

 

Twokey_2-1693459174245.png

Fig. 1.a, Can bus signal issuzed by Can emulator, 

Twokey_4-1693459637236.png

Fig 1.b Can bus signal issuzed by S32K118 EVB 

 

 

 

 

0 件の賞賛
返信

818件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

I have not installed S32K1 SDK RTM4.0.1 in S32DS v3.5, so I cannot open your project. But the can_pal_s32k118 in SDK RTM 4.0.3 enable CAN FD(flexible data rate) by default. And Bitrate of Data Phase is 1000kbit/s.

can_pal_s32k118_SDK403 Enable flexible data rate.pngDoes your can emulator support CAN FD? If it is not supported, it is recommended to modify the project to disable CAN FD.

By the way, it is recommended to use the latest SDK, because the new version fixes the bug that has been discovered.

2.2 List of fixed issues from S32K1xx RTM 4.0.2.png

0 件の賞賛
返信

879件の閲覧回数
Twokey
Contributor II

Hi, Robin

Thanks for your valuable information.

I forget to provide BAT(J16) voltage to S32K118 EVB. 

The can signals will be sent from EVB after either the BTN0 or BTN1 is pressed.

Thanks,

Twokey