CAN example S32k344

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

CAN example S32k344

802件の閲覧回数
somto
Contributor I

After running the CAN example code, I connected a PCAN-USB adapter to S32k344 J32 which is the output of the CAN transceiver TJA1443ATK. But then, I don't receive any CAN message via the PCAN-view GUI. My question is are there a code different from the given example that will cause the CAN controller to send CAN message over the CAN BUS given that the example code implements the LoopBack feature.

タグ(1)
0 件の賞賛
5 返答(返信)

778件の閲覧回数
somto
Contributor I

Thank you @PetrS . Actually I ran the flexcan example as CAN example doesn't have an option to change to normal mode. However, nothing appears in the PCAN-view GUI after connecting the PCAN- USB adapter to the CAN transceiver TJA1443ATK. Attached is my code 

0 件の賞賛

732件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

which board do you use? If self made one, please share MCU-CAN PHY circuitry.
If nothing can be sent, check if right pins connected to CAN transceiver are used and initialized. CAN transceiver has to be active and terminated.
Then check module ECR/ESR1 registers to know status and possible errors detected.

BR, Petr

0 件の賞賛

724件の閲覧回数
somto
Contributor I

Hi @PetrS. I'm using S32K344 Rev B board and from the board schematic, the CAN transceiver is internally terminated with 120 ohms resistor while the PCAN usb adapter is also terminated with 120 ohms as well . I've also added pin configurations for PTA 6 (CAN0_rx), PTA7(CAN0_tx), PTC20(CAN0_STB), PTC21(PTCCAN0_EN) and PTC23(CAN0_ERRN).

 Attached is the ECR/ESR1 register status

0 件の賞賛

681件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

not sure of the board still...
From ESR1 it seems module is not synchronized to the bus. Check pin setting and RXD line.

BR, Petr

0 件の賞賛

785件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport
Hi,
 
CAN demo examples are running in loopback mode, so to run in Normal mode with CAN tool connection you need to 
- add/configure pins connected to CAN transceiver
- check if CAN bitrate is properly set and select Normal mode in FlexCAN configuration
- be sure CAN transceiver is active and properly terminated.
 
Could below example be helpful?
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-FlexCAN-Ip-TX-RX-EnhanceRXFIFO-test...
But it is using low level FlexCAN IP driver. 
 
Attached is modified HLD example. It sends message with std ID 0x1 first then wait for message with std ID 0x2, once received it send ID 0x1 message back with incrementing first byte in payload.
This what I see with PCAN connected on S32K3x4EVB-Q172 board (rev.A).
 
PetrS_1-1712920392877.png

 

BR, Petr

 

0 件の賞賛