[TODO] AT91SAM7 CAN Driver

ChibiOS public support forum for topics related to the Atmel AT91SAM7x family of micro-controllers.
FlorianS
Posts: 22
Joined: Thu Jan 26, 2012 12:29 pm

[TODO] AT91SAM7 CAN Driver

Post by FlorianS »

Hi,
i just spent a little time to test the driver. I additionally inserted the errorhandling ststus to the driver (that's why i included the highlevel driver files).
I hope you enjoy it.

Florian

P.S. some more drivers will follow in the next weeks.
Attachments
AT91SAM7_CAN.zip
(11.77 KiB) Downloaded 1121 times
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: AT91SAM7 CAN Driver

Post by Tectu »

Thank you very much for sharing your work! Would you like to include your driver into the community repository?


~ Tectu
FlorianS
Posts: 22
Joined: Thu Jan 26, 2012 12:29 pm

Re: AT91SAM7 CAN Driver

Post by FlorianS »

Hi,
i hope the driver will find it's way to one of the next chibios versions

Greetings
Florian
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: AT91SAM7 CAN Driver

Post by Giovanni »

Hi,

Some new drivers have been added to the AT91SAM7 platform, did you see them? better to not duplicate effort :) your CAN driver will be added too. The platform looks quite complete now, almost at the same level of the STM32.

I am going to appoint a new maintainer for this platform and open a dedicated forum, of course it would be possible to have two maintainers if you are interested too.

The idea is to make each platform have its own maintainers, more info will follow during next weeks.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] AT91SAM7 CAN Driver

Post by Giovanni »

Moved here from contributions.

Giovanni.
FlorianS
Posts: 22
Joined: Thu Jan 26, 2012 12:29 pm

Re: [TODO] AT91SAM7 CAN Driver

Post by FlorianS »

Hi,
I'm really sorry in a small modification before I sent you the driver i made a little/big mistake. In Line 525 (can_lld_transmit(...)) of can_lld.c (old: canp->base->CAN_IER = CAN_MB(CAN_TxMB0); ) must be for sure:

Code: Select all

   canp->base->CAN_IER = 1 << CAN_MB(CAN_TxMB0);

because CAN_MB(CAN_TxMB0) gives the mailbox number (0...7) but it needs to be 0b0100 for mailbox 3 (not 0b0011).

Stupid me! SORRY!

Florian
FlorianS
Posts: 22
Joined: Thu Jan 26, 2012 12:29 pm

Re: [TODO] AT91SAM7 CAN Driver

Post by FlorianS »

Hi,
I'm wondering if the (AT91SAM7) CAN Driver will be integrated in the next version of ChibiOS. Can I somehow support that?

Regards,
Florian
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] AT91SAM7 CAN Driver

Post by Giovanni »

Hi Florian,

The maintainer of this area hasn't been very active of late, would you be interested in help maintaining this port and integrate the driver yourself?

Giovanni
FlorianS
Posts: 22
Joined: Thu Jan 26, 2012 12:29 pm

Re: [TODO] AT91SAM7 CAN Driver

Post by FlorianS »

Hi,
If you allow I'll integrate the driver my way and I try to help maintainining as much as possible.

I'd need some tutorial for that. :)

Regards,
Florian
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] AT91SAM7 CAN Driver

Post by Giovanni »

Hi,

You need a sourceforge account , I will enable it to access the repository.

Helping maintaining means keeping the code and demos in release-able order, on this platform there isn't really much to do because it is very static. Probably I will not even port it over to ChibiOS 3.0 if there isn't a clear demand for it.

Giovanni
Post Reply