FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5881 Discussions

CAN data length sometimes wrong

TJesp1
Beginner
558 Views

Hi

 

We use the Altera CAN IP and HPS CAN API on the Cyclone V SoC.

 

Even though we always send the same data length (DLC) on a given CAN ID, it is sometimes sent with an incorrect DLC.

Just for reference one frame/ID is transmitted approximately 3700 times and 11 of these frames have an incorrect DLC (either higher or lower).

 

We have dedicated threads for RX and TX, with RX as the highest priority and using the lowest mailbox numbers (1-32), and mailbox number 33 as TX. But if I understood it correctly the Altera HPS CAN API uses IF1 for RX and IF2 for TX. Or should there be implemented further thread safety when accessing the CAN registers?

 

We use redundant CAN busses, so all data is transmitted on CAN0 and then on CAN1.

 

We use the MOTRX register to verify that the frame is transmitted, before transmitting the same data on CAN1.

 

If I disable the CAN1 transmission the DLC is correct. But the interfaces should be completely separated, correct?

 

Are there any constraints on the frequency of transmitting frames? I've increased the transmission rate to about 700 msg/s, which yields a bus load of about 15% (using PCAN Explorer 5).

 

Is it a known issue? Or has anybody else experienced this?

 

Thank you.

 

Best regards

Thomas

0 Kudos
5 Replies
EBERLAZARE_I_Intel
173 Views

Hi Thomas,

 

Is the CAN bus enabled in device tree?

 

Regards.

TJesp1
Beginner
173 Views
Hi el.ign I’m not sure what you mean with “Device Tree”? We are running uC/OS-III as OS on ARM0 with two threads (one for RX and one TX) utilizing the Altera HPS CAN Controller API. Thomas Jespersen Senior Firmware Engineer, B.Sc.E.E. Secure Power Kolding Building & IT Business Schneider Electric D +45 72 19 02 40 F +45 72 19 03 50 E thomas.jespersen@se.com<mailto:thomas.jespersen@se.com> Silcon Allé 1 6000 Kolding Denmark [http://www.schneider-electric.com/b2b/en/campaign/life-is-on/life-is-on.jsp#xtor=CS4-112-[Mixed]-[li...]<http://www.schneider-electric.com/b2b/en/campaign/life-is-on/life-is-on.jsp#xtor=CS4-112-[Mixed]-[li...> *Please consider the environment before printing this e-mail [Blog]<https://www.facebook.com/SchneiderElectric> [Blog] <https://www.linkedin.com/company/schneider-electric> [Blog] <http://blog.schneider-electric.com/> [Blog] <https://www.twitter.com/SchneiderElec> [Blog] <https://www.youtube.com/schneidercorporate> [Blog] <https://plus.google.com/+schneiderelectric> [Blog] <https://instagram.com/schneiderelectric>
EBERLAZARE_I_Intel
173 Views

Hi Thomas,

 

The CAN is enabled in the device tree using Linux;

 

I highly suggest you refer here;

https://rocketboards.org/foswiki/Documentation/LinuxCANBusOnTheCyclone5

 

Regards.

TJesp1
Beginner
173 Views
EBERLAZARE_I_Intel
173 Views

Hi,

 

I would recommend that you configure the CAN bus in the Linux Kernel to make sure your design is working there.

 

Regards.

Reply