6 years, 6 months ago.

Bounty/job: CAN bus on STM32F303

Hi everybody, I'm developing a project ( https://hackaday.io/project/7134-crunchtrack ) and I need some help. I'm actually working on the backend and hardware of that project and I'm tight on time and grew frustrated at integrating the CAN bus functionality on the mbed platform. I'm actually having the CAN working on the IAR studio, but I need it to work under the mbed platform too to make it easy for all the users. Mbed and ST are not helpful, and I'm getting all kind of errors porting code from similar projects (there's code here for F4* and F103), so I'm looking for someone that can help me with that. The code will be released open source, and I need it asap (let's set a deadline: 3 january 2016, 10% bonus for whoever can deliver before 28 dec. 2015)

I'm offering one of these bounties, based on the abstraction I will get:

- 200 eur for adding the functionality to the mbed library making it as transparent and easy as the NXP original code

- OR 150 eur for writing a library that can be added to a project with example code

- OR 100 eur for just writing an example main.c of how to use the CAN by directly talking to the CMSIS or something. Ugly but working.

I need: functions to read the buffer in and send messages, functions to initialize the hw and filters, a way of handling interrupts and errors. The target is the STM32F303, on the NUCLEO-F303RE board.

I will pay via Paypal after seeing a working demo via skype. Anyone's up for it?

If I am bored during holidays I might have a look. However do you have any idea if the F407 (from Arch-MAX) has identical CAN to the F303? Since that is the only STM board with CAN I own.

By the way, have you considered just using an NXP MCU?

posted by Erik - 22 Dec 2015

From looking at the CAN drivers for libopencm3 and ChibiOS, there's virtually no difference between the bxCAN peripheral between the F0, F1, F3, or F4 series except that the F0/F3 don't have the second slave CAN controller.

I think that the ongoing community work on CAN for the F103 using the ST HAL should be reusable, apart from needing some hacks to work around the CAN symbol from CMSIS shadowing the mbed API CAN class.

posted by Devan Lai 22 Dec 2015

See my answer below.

posted by Zoltan Hudak 22 Dec 2015

Erik, I considered the NXP but it's too big for my PCB and I don't want to go BGA.

posted by Mastro Gippo 22 Dec 2015

1 Answer

6 years, 6 months ago.

Hi. I have extended the CANnucleo library to support also the NUCLEO-F303RE boards. The CAN_Nucleo_Hello compiles smoothly. However, since no NUCLEO-F303RE is available to me I am sure that your co-operation will be needed to make it work with real hardware. Please let me know how it works.

Accepted Answer

Nice! I tried a lot to make your library work earlier but with no success before this update - I'll try it tomorrow. Thanks!

posted by Mastro Gippo 22 Dec 2015

I'm still trying to get it working, the CAN is not initializing. I think there's a problem with the pin configuration, as I'm using can(PB_8, PB_9).

posted by Mastro Gippo 24 Dec 2015

Changed alternate function selection for CAN pins. Does it work?

posted by Zoltan Hudak 27 Dec 2015

It works, thanks! I'm sending you a private message to get your PP address.

posted by Mastro Gippo 28 Dec 2015

Hi Mastro, I'm glad that I was able to help you. That's good enough for me. We are building here open source so just forget about any PP. By the way, you have a nice and challenging project so keep on and good luck.

posted by Zoltan Hudak 30 Dec 2015

Well, thank you very much then! Have a good 2016! :)

posted by Mastro Gippo 02 Jan 2016