New CAN Bus Library for the stm32f103

Working libraries, libraries being ported and related hardware
john k2ox
Posts: 4
Joined: Sun May 03, 2020 7:15 pm

New CAN Bus Library for the stm32f103

Post by john k2ox »

I've shared a CAN bus library at https://github.com/exothink/eXoCAN that I developed using Arduino, Platformio and 'Blue Pill' boards.

This is my first time publishing a library and I hope I've crossed all the 't's.

John
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: New CAN Bus Library for the stm32f103

Post by fpiSTM »

Thanks for sharing

Note: I move it under Libraries forum of LibMaple.
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: New CAN Bus Library for the stm32f103

Post by stevestrong »

I don't think that it is for libmaple.
Under "Instalation" is stated:
The library was developed using Platformio and STM32duino
.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: New CAN Bus Library for the stm32f103

Post by fpiSTM »

stevestrong wrote: Wed Jun 03, 2020 3:34 pm I don't think that it is for libmaple.
Under "Instalation" is stated:
The library was developed using Platformio and STM32duino
.
PIO uses maple core for the STM32F103 based board...
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: New CAN Bus Library for the stm32f103

Post by stevestrong »

It will not compile for libmaple, because it uses digitalToggle() function, which does not exist in libmaple core...
I am sure PIO uses the official ST core 8-)
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: New CAN Bus Library for the stm32f103

Post by fpiSTM »

It uses official core for all other. For digitalToggle ok. Anyway several other functions are not in the core and also why defining all peripherals register while STM32 core includes the CMSIS device...
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: New CAN Bus Library for the stm32f103

Post by stevestrong »

Well, some of those registers (e.g. GPIO) are also defined in the libmaple core, and he still redefines them...

Anyway, I think we have to ask again the OP which core he actually used.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: New CAN Bus Library for the stm32f103

Post by fpiSTM »

Right, anyway I think you are right.
ozcar
Posts: 143
Joined: Wed Apr 29, 2020 9:07 pm
Answers: 5

Re: New CAN Bus Library for the stm32f103

Post by ozcar »

I only recently tried to use Platformio for the first time. If I create a project, I have to select a "board" and a "framework". If I select say Nucleo F103RB for the board, it gives me five choices for the framework - Arduino, Mbed, libOpenCM3, STM32Cube, and Zephyr. If I select board bluepill F103C8 instead, there are 6 frameworks to select from, CMSIS being the extra one. Some of the other boards, which are not really boards but just generic F103 processors, do offer CMSIS, but not Zephyr.

All this is mysterious to me. However, if I select Arduino for the framework, and actually create a project, it does seem to use the official ST core, but then I have not tested this for all the various F103 "boards" (if that makes any difference).
kjn
Posts: 8
Joined: Wed Apr 15, 2020 4:21 am

Re: New CAN Bus Library for the stm32f103

Post by kjn »

Happy to confirm that this library works well on the standard core.

Software Configuration:
Arduino 1.8.10
STM32duino Core 1.8.0

Hardware Configuration:
Generic STM32 Bluepill
Ti SN65HVD232D Can Tranciever
Kvaser Leaf Light v2
Single 120ohm Termination Resistor

Tested Baudrates:
250K (BR250K) , 500K (BR500K) & 1000K (BR1M)

https://www.imgur.com/a/0jSq290
Post Reply

Return to “Libraries & Hardware”