Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
GiBa_1627766
Level 1
Level 1
First reply posted First question asked

MCU = MB9BFD18T

I set the CAN bus to receive in interrupt mode, my code follows what shown in an official sample code "mb9bfxxx_can_uart_terminal-v15".

It works for 10-20 min. then it locks up.

If the CAN bus is polled in background every few msec it works forever, but this is an unnecessary loading of the processors asking for new CAN messages most part of the time without finding them received.

The problem of polling is that if it is very frequent to avoid missing messages it loads the MCU; if it is more relaxed, it happens to miss messages.

The peripheral units send messages on event with same ID (identified by message content), and it happens that two or more units check a new event at the same time or very closely; few messages come in a burst, if the polling is relaxed some of them are missed.

Any one experiencing this interrupt problem with CAN bus?

Thanks.

G.B.

0 Likes
3 Replies
HolgerW_56
Employee
Employee
25 solutions authored 10 sign-ins 5 sign-ins

Hello G.B.

of course, interrupt mode should work, too.

then it locks up.

Have you debugged, where it locks up? Where does it hang in your code?

Please can you explain a little in detail your scenario, honestly I could not understand your setup as described

The peripheral units send messages on event with same ID (identified by message content), and it happens that two or more units check a new event at the same time or very closely; few messages come in a burst, if the polling is relaxed some of them are missed.

Do you have multiple units (CAN nodes) sending with same ID? You should avoid this.

Please provide a small block diagram showing your scenario with used IDs!

#Holger

0 Likes

Please see my answers below.

I have tried to access the community from Cypress site but the link redirects to a “page not-found”.

Ing. Giuseppe Barbagallo

Cell. +39 338 6569100

Da: howe

Inviato: mercoledì 4 luglio 2018 10:04

A: Giuseppe Barbagallo

Oggetto: Re: - CAN receive in interrupt mode

<http://www.cypress.com> Cypress Semiconductor logo

<https://community.cypress.com/?et=watches.email.thread> Cypress Developer Community

CAN receive in interrupt mode

reply from howe <https://community.cypress.com/people/howe?et=watches.email.thread> in FM3 MCU Community - View the full discussion <https://community.cypress.com/message/161649?et=watches.email.thread#161649>

0 Likes
Roy_Liu
Moderator
Moderator
Moderator
First comment on KBA 10 questions asked First comment on blog

Dear G.B.

You may try to clear your browser cookies to see if your can come out of the “page not-found" issue.

Thanks

Roy

Roy Liu
0 Likes