Skip to main content
AWu
Associate II
Jun 18, 2019 12:07 PM UTC
Solved

Looking for minimal/basic CAN bus example code for the F103 and/or F423

Dear experts,

I'd be grateful if you could point me to some basic CAN bus example code for the F103 (blue pill) which later may be ported to the F4xx family (most likely F423)

Thanks for your help!

This topic has been closed for replies.
Imen.DBest answer
ST Technical Moderator
Jun 18, 2019 4:05 PM UTC

Hello,

You can get inspired from the CAN example available in the STM32CubeF1 firmware package to configure the CAN peripheral to send and receive CAN frames in normal mode: STM32Cube_FW_F1_V1.7.0\Projects\STM3210E_EVAL\Examples\CAN\CAN_Networking

There are also many CAN examples with STM32CubeF4 firmware package.

Best Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks

3 replies

Imen.DBest answer
ST Technical Moderator
Jun 18, 2019 4:05 PM UTC

Hello,

You can get inspired from the CAN example available in the STM32CubeF1 firmware package to configure the CAN peripheral to send and receive CAN frames in normal mode: STM32Cube_FW_F1_V1.7.0\Projects\STM3210E_EVAL\Examples\CAN\CAN_Networking

There are also many CAN examples with STM32CubeF4 firmware package.

Best Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
AWu
AWuAuthor
Associate II
Jun 19, 2019 3:06 AM UTC

Thanks, Imen!

Ozone
Principal
Jun 19, 2019 5:26 AM UTC

IMHO Cube examples don't fit a "minimal/basic" description very well.

At least for the F103, SPL-based (Standard Peripheral Lib) examples are available. The SPL examples highlight the setup process better than the convoluted Cube code. I had tried some while ago with a Cube-based F74x example, and fell back to the MCB1760 (NXP).

I think for the F42x, SPL code might be available too.