Can't use CAN2 without CAN1, and filters

Report here problems in any of ChibiOS components. This forum is NOT for support.
steved
Posts: 487
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 38 times

Can't use CAN2 without CAN1, and filters

Postby steved » Fri Nov 24, 2017 11:00 am

Using 32F767, but probably applies to all.

1. The hardware allows use of CAN2 without CAN1 being active; while there are interactions, these appear to be solely or largely in the area of filters. (See 40.9.4 in RM0410 makes it clear that this is a supported configuration). However the current driver requires CAN1 to be started, even if not used, before CAN2 can be started.

2. canSTM32SetFilters(), which I assume to be the 'official' API for setting of the filters clearly expects to be called before the driver is started. However it is possible to update the filters at run-time by setting FINIT in CAN_FMR register. (I've got other comments on the API to the filters, but since they're by way of enhancements, I'll post them elsewhere)

User avatar
Giovanni
Site Admin
Posts: 10571
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 267 times
Been thanked: 228 times
Contact:

Re: Can't use CAN2 without CAN1, and filters

Postby Giovanni » Fri Nov 24, 2017 11:12 am

hi,

Could you post a patch for this?

Giovanni

steved
Posts: 487
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 38 times

Re: Can't use CAN2 without CAN1, and filters

Postby steved » Fri Nov 24, 2017 1:07 pm

Giovanni wrote:Could you post a patch for this?

Eventually - not expecting to have hardware to play with and test for a week or two. And it'll include some extensions to the API to support filter updates on the fly. (Code's pretty much done; just needs testing/debugging, so can make available if anyone else has this problem)

User avatar
Giovanni
Site Admin
Posts: 10571
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 267 times
Been thanked: 228 times
Contact:

Re: Can't use CAN2 without CAN1, and filters

Postby Giovanni » Sat Jan 20, 2018 4:35 pm

Bump, is this still a thing?

Giovanni

steved
Posts: 487
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 38 times

Re: Can't use CAN2 without CAN1, and filters

Postby steved » Sun Jan 21, 2018 10:16 am

Giovanni wrote:Bump, is this still a thing?

Giovanni

Yes it is - working on CAN ATM, but not to the point of having anything to submit yet.

hercek
Posts: 3
Joined: Wed Sep 20, 2017 9:33 pm

Re: Can't use CAN2 without CAN1, and filters

Postby hercek » Sun Jan 21, 2018 5:49 pm

CAN1 must be started before CAN2 (even when only CAN2 is used) on STM32F405 too.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 3 guests