Hi,
I am using MSCAN driver for KEA128. I am just modified
void Transmit_DataFrame(void) and
void Receive_DataFrame(void) functions.
I configured CAN for 250kbps.
My program works fine transmission from KEA to PC. But some time receive "Form Error,Rx,Acknowledge delimiter,RxErr=1,TxErr=0" when I transmit from KEA to PC.
When I send message from PC to KEA getting BUSOFF error after TxErr counter reaches 256.
Original Attachment has been moved to: MSCAN_KEA128.zip
Hi hemantsindkar,
Please check my project on your side, this project is also 250Kbps baudrate for MSCAN, it is working ok on my TRK-KEA128 board.
I check it with the CAN test tool, and send data to PC, none TX error happens.
This is the test result:
The codewarrior project is in the attachment.
Wish it helps you!
If you still have problem, please let me know!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jingjing,
Thanks for sharing code.
You code works fine on my board. So from this it is clear there is no hardware issue.
As I am using MSCAN_KEA128 drivers available from NXP I am not understand whats wrong with those drivers.
Kinetis KEA128 StarterTRAK CAN Applications|NXP
Thanks & Regards
Hemant Sindkar
Hi hemantsindkar,
Sorry for my later reply!
I have check your CAN initialization, it is no problem for 250Khz baud rate, I test it on my side, it also have no problem.
I think it may relate to your main function code, you can try add some delay between each transmit calling.
I call it like this:
for(;;) | |
{ | |
for(j=0;j<10;j++) for(i=0;i<65535;i++); | |
TEST_CASE_FUNC(Demo_Transmit_DataFrame);//set different parameter to choose other test case to run | |
} |
The CAN test tool can receive all the data.
Besides, you all can use my code which I give you before, that is from KE series.
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I test TEST_CASE_FUNC(Demo_Transmit_DataFrame)is OK.
I use TEST_CASE_FUNC(Demo_Receive_DataFrame) and set break point on here to test receive.
No interrupt be happen.
Have a nice day.
Peter
Do you send the CAN data to this Can node?
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.
-------------------------------------------------------------------------------
Hi Kerry:
Thanks, I sure send CAN data by the device.
Hi Peter Wang,
It's better to create a new question post about your own question, don't just follow other's closed question.
After you create the new question post, we will help you in your own post.
When you create the question post, please let us know the chip part number, the board, the detail question, then question test result pictures.etc.
Thanks a lot for your understanding.
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.
-------------------------------------------------------------------------------
Hi Kerry:
I'm sorry my can device connect has a mistake. It's can receive data when I solve it.
Have a nice day.
Peter
Hi Peter,
Thank you for your updated information.
And it's very good to hear you find the root hardware problem.
Next time, if you have the question, please create the new question post, don't follow others solved post, it maybe ignored.
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.
-------------------------------------------------------------------------------
I think we can assume there is nothing 'wrong' with the drivers, but more the context or configuration.
So what about that clock setup?
To see where we are going, you might look at:
Sounds like a 'small' error in bit-rate. What is your clock source, and what do you divide it down to (Tq to get 250kbps)?
Hi Earl,
My clock source is BUSCLK.
I am using MSCAN_KEA128 drivers available from NXP.
Kinetis KEA128 StarterTRAK CAN Applications|NXP
Thanks & Regards
Hemant Sindkar