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:
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.
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
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.
-------------------------------------------------------------------------------
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
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,
Fig. 1, Can bus signal measured by LA,
Fig. 1.a, Can bus signal issuzed by Can emulator,
Fig 1.b Can bus signal issuzed by S32K118 EVB
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.
Does 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.
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