S32K CAN send message failed(IFLAG1 register always != 1)

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

S32K CAN send message failed(IFLAG1 register always != 1)

跳至解决方案
3,925 次查看
KDB_beginer
Contributor II

Hello,everyone

I have some questions which always trouble me。

when i use S32K146 to send can message, but my IFLAG1 register do not be set,so the message can be send to can bus. the specific reason of this phenomenon i do not konw. So I come to ask for help.

My english is poor, so my language may not be polite, i hope you can understand! 

Best wishes!

i use can1 TX and Rx, the pin :PTA12 and PTA13

software is S32DS

My program and my reference program are attached belowhttps://www.programmerall.com/article/39671163824/ (my reference program)

标签 (2)
0 项奖励
回复
1 解答
3,863 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Please check the value of IFLAG instead of IFLAG1.

55.3.2 Transmit process.png55.3.4 Receive process.png

If you want to receive CAN message with RX FIFO, please refer: S32K1xx SDK FlexCAN sample projects to demonstrate its basic and advanced features

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 项奖励
回复
6 回复数
1,407 次查看
zjixyix
Contributor I

Hello, I also have same issue and i could not found IFLAG ,it only have IFLAG1.

0 项奖励
回复
3,881 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Please test the can_pal_s32k144 example in S32SDK S32K1xx RTM v3.0.0. The example documentation can be found in the S32 SDK documentation at Examples and Demos section. (<SDK_PATH>/doc/Start_Here.html)

can_pal_s32k144.pngCAN PAL.png


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 项奖励
回复
3,876 次查看
KDB_beginer
Contributor II

I just want to konw why my program can not send message.

In referrence manual, say :

IFALG1 register defines the flags for the 32 message buffer interrupts for MB31 to MB0. It
contains one interrupt flag bit per buffer. Each successful transmission or reception sets
the corresponding IFLAG1 bit. If the corresponding IMASK1 bit is set, an interrupt will
be generated. The interrupt flag must be cleared by writing 1 to it. Writing 0 has no
effect. There is an exception when DMA for Rx FIFO is enabled, as described below.
 

but when i send a message, the IFLAG1 can not be set.

标记 (1)
0 项奖励
回复
3,864 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Please check the value of IFLAG instead of IFLAG1.

55.3.2 Transmit process.png55.3.4 Receive process.png

If you want to receive CAN message with RX FIFO, please refer: S32K1xx SDK FlexCAN sample projects to demonstrate its basic and advanced features

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 项奖励
回复
3,775 次查看
KDB_beginer
Contributor II

HI,But i can not find IFLAG register, In the data sheet only have IFLAG1 Register

标记 (1)
0 项奖励
回复
3,781 次查看
KDB_beginer
Contributor II

thanks you!My best friend!

标记 (1)
0 项奖励
回复