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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jump to solution
721 Views
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)

Labels (2)
0 Kudos
1 Solution
659 Views
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.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
677 Views
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 Kudos
672 Views
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.

Tags (1)
0 Kudos
660 Views
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 Kudos
571 Views
KDB_beginer
Contributor II

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

Tags (1)
0 Kudos
577 Views
KDB_beginer
Contributor II

thanks you!My best friend!

Tags (1)
0 Kudos