CAN communicate one time but on second time not

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

CAN communicate one time but on second time not

1,100件の閲覧回数
avppoian
Contributor I

I am trying to communicate with CAN to another module. One time I got it, but when i send another time it stays in loop in txComplete = false. I don´t know what is wrong in my software. In KDS I got it doing 3 or 4 or any time with this module. I don´t know why with mcuxpresso i can´t. I am using MK22FN1M0AVLL12. Anybody can help me? I think the problem could be a flag but i don´t know what.

ラベル(1)
0 件の賞賛
9 返答(返信)

948件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Alexandre V.D.P,

     I highly suggest you try the official SDK code for your MK22FN1M0AVLL12 at first.

     You can download the SDK code from this link:

https://mcuxpresso.nxp.com/en/select 

pastedImage_2.png

    This code default chip is for TWR-KV21F120M board, but if you download the MK22FN1M0AVLL12 sdk code, the according header files , drivers and the system_chip files from this folder:

\SDK_2.3.1_MK22FN1M0Axxx12\devices\MK22FA12

  The project you can refer to this folder code:

SDK_2.3.1_MK22FN1M0Axxx12\boards\twrk21f120m\driver_examples\flexcan\interrupt_transfer

  But when you use the MCUXpresso IDE, please change the header file, the MCU part number, the system files, and the startup files, all these can be found from folder:

\SDK_2.3.1_MK22FN1M0Axxx12\devices\MK22FA12

Please try it on your side.

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛

948件の閲覧回数
avppoian
Contributor I

I am trying to send to another side but I wait for rxComplete and not goes to true. I am using the example, not works.

0 件の賞賛

948件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Alexandre,

    Do you use the PC CAN analyzer side software to test it? What about the send, whether it works or not?

   About the receive, please also check the ID filter, do you send out the correct ID in the other CAN node.

   If you still have question about it, please send me your detail test result with the CAN analyzer.

   Please also check your CAN transceiver, make sure the CAN hardward side don't have problems.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛

948件の閲覧回数
avppoian
Contributor I

Can I send my example to you. The PLACA MITL sends to DETECTOR1. If DETECTOR 1 responds the PLACA MITL turn on the led and turn off the led. It sends on time and receive but in second time it stops in txComplete. The communication is ok, I did the configuration of speeds inside of

FLEXCAN_GetDefaultConfig(&flexcanConfig);

My problem I think is some flag that is not cleaning but i don´t know who create the code and I need help to make the communication.

0 件の賞賛

948件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Alexandre,

    You can send me your test project.

    But,  from tomorrow, I will on our Chinese Spring Festival, I will back on February 11th.
So,  I will reply you on 2019 February 11th. If you are in a hurry, you can create the new case, then my other colleague also will help you!
Thanks a lot for your understanding and sorry for the inconvenience I bring you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛

948件の閲覧回数
avppoian
Contributor I

But how can i send a archive to you. From here it is impossible

0 件の賞賛

948件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

You can attached it in the advanced editor.


Have a great day,
Kerry

-------------------------------------------------------------------------------
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 件の賞賛

948件の閲覧回数
avppoian
Contributor I

No don´t have problems because I can communicate with a power supply that have CAN and the other board I tested with power supply and the CAN works. I can send my software to you. I think could be some configuration. My problem is communicate board to board. The power supply other guy make on ST microcontroller.

0 件の賞賛

948件の閲覧回数
avppoian
Contributor I

I need a example of CAN transmission and receive that in one side I transmit and other waits to receive by a interrupt flag.

0 件の賞賛