Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN FD : communication state errors and warnings

*NOTE : I am using NI-8512/2 CAN card and using NI's C API's no LabView. 

 

I have my CAN communication setup with arbitration phase baud rate as 500kb and data phase baud rate as 2Mb.

Initial part of my test I send out standard CAN frame requests (Frame type : nxFrameType_CAN20_Data), later in the test when the flash step starts we send out CAN FD BRS frame requests (Frame type : nxFrameType_CANFDBRS_Data) to send larger payload of data at faster FD rate.

We continuously monitor the bus communication state using "nxReadState()" function and report the error or warning state.

 

So for the initial part of the test we don't see any errors/warnings from the state value, but in the later stage of the test we start seeing state warnings initially and then an error passive state error. The communication continues but with all these warnings tell me that something is not correct.

 

Can someone explain why this would be happening or any suggestions to try out?
Just for testing I did try out different bit timing register values for 2Mb (75% and 80% sample point values with the help of NI Bus Monitor Interfaces and Database settings), didn't help.   

Following is the sequence of warning which eventually turn into an error:

0x80000201 // I believe this means error passive state.
0x7d000200
0x7b000100
0x7d000200
0x7e000200
0x71000200
0x72000000
0x7e000200
0x7b000100
0x7e000200
0x6c000100
0x7b000200
0x77000100
0x7e000100
0x7e000200
0x71000200
0x71000000
0x74000000
0x7e000100
0x7e000200
0x74000200

    

Thanks

0 Kudos
Message 1 of 4
(2,305 Views)

Sounds to me like a bit timing mismatch, even though you already tested some.

Did you create custom baud rate values with the correct sample points as required by the other devices for both the standard and FD baud rates? The nominal baud rate sample point is most important as it indicates the beginning of the BRS-speed phase.

Is the bus terminated properly?

 

More background info on how to do that is in this document: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P7mDSAS&l=en-US

0 Kudos
Message 2 of 4
(2,250 Views)

Thanks for your reply.

 

Setting custom baud rates for Arb and Data is something I am about to try out, as I am just setting custom for Data and standard for Arb.

 

Yes the bus is properly terminated as the communication works fine in my initial test steps.

 

I'll follow up with my findings.

 

0 Kudos
Message 3 of 4
(2,243 Views)

Here are my findings not perfect I still get some warnings/errors but less compared to what I got earlier.

For arbitration baud rate : 500kb

I had to use custom baud rate of sample point 80%, as standard default sample point is 87.5%.

 

For data baud rate : 2000kb

I used the standard as its default sample point is 80%.


Above settings has drastically reduced the communication state warnings and errors
0x760400
0x870401

0x800301

0x600300

 

0 Kudos
Message 4 of 4
(2,232 Views)