It can't work about FlexCAN in S32K312.

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

It can't work about FlexCAN in S32K312.

Jump to solution
2,629 Views
f-nelson
Contributor III

Hi NXP:
I'd like to try FlexCAN function in example code(FreeRTOS_Toggle_Led_Example_S32K312), but it can't work.
I have using logic analyzer for quering issue, and CAN TX/RX pin are not expected, please help me, many thanks.

1.MCU pin29(CAN-RX):it always appears some strange signal.
2.MCU pin54(CAN-TX):always high.

environment:
1.SW32K3 FreeRTOS 10.6.0 version 4.0.0 is based on S32K3 RTD 4.0.0
2.set speed 500KBps of FlexCAN
3.we're using CAN transceiver(TI TCAN1044)

attachment:
20241223-FreeRTOS_Toggle_Led_Example_S32K312.7z
20241223-LA_CAN_screenshot.png

0 Kudos
Reply
1 Solution
2,563 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@f-nelson

Maybe this may be a hardware problem, such as the transceiver and its peripheral circuits, but this transceiver is not made by NXP, so I can't help you evaluate it.

View solution in original post

0 Kudos
Reply
7 Replies
2,609 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@f-nelson

Please do not add FreeRTOS first, and then test whether the CAN function is normal.

When the CAN function is normal, add FreeRTOS for testing.

 

This is a demo base on RTD 4.0.0 and you can refer to first.

Example S32K358 FlexCAN TXRX ISR S32DS35 RTD400

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K358-FlexCAN-TXRX-ISR-S32DS35-RTD400/ta-...

0 Kudos
Reply
2,604 Views
f-nelson
Contributor III

Hi NXP:
thansk for your suggestion. I created new project of S32K312 and porting example code from
"S32KXX AUTOSAR R21-11 RTD 4.0.0 D2311 Example Projects\FlexCAN_Ip_Example_S32K344",but the
result is the same. in fact,I curious about CAN-RX signal is always outputing strange wave.
Is it possible about pin setting issue or something else?

0 Kudos
Reply
2,597 Views
f-nelson
Contributor III

Hi NXP:
just now I changed porting code from Example_S32K358_FlexCAN_Ip_TXRX_ISR_rtd400 which your recommanded,
and maked sure GPIO is normal, but the result is the same failed, please help me as soon as possible, thanks.

attachment:
20241223-test_CAN2.7z
20241223-20231223-CAN_transceiver_schematic.png

0 Kudos
Reply
2,579 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@f-nelson

Lot of error in your project and i made some modification in the attachments.

Senlent_0-1735018121186.png

 

0 Kudos
Reply
2,569 Views
f-nelson
Contributor III

Hi NXP:
many thanks for your modified. In this mornring, I tried to modify flexCAN protocol clock to 24Mhz as FIRC clock source and adjusted bit rate to 500kbps, and then it can works about CAN bus function by LA or PCAN-viewer, but it still has some strange data wave of CAN-RX. just now I used your modified workshop for testing and the result is the same. Do you have any ideas of CAN-RX pin? thanks.

PS.I captured wave pictures by LA from your modify workshop as attachment.

0 Kudos
Reply
2,564 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@f-nelson

Maybe this may be a hardware problem, such as the transceiver and its peripheral circuits, but this transceiver is not made by NXP, so I can't help you evaluate it.

0 Kudos
Reply
2,560 Views
f-nelson
Contributor III

Hi Senlent:
Sorry,it's my fault.I found an issue about Logic analyzer. I used scope and LA at the same time,
and scope is normal no strange wave, so I changed another channels of LA and wave is perfect,thanks again.

have a good day.

Tags (1)
0 Kudos
Reply