Page 1 of 2

New CAN Bus Library for the stm32f103

Posted: Sun May 03, 2020 7:46 pm
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

Re: New CAN Bus Library for the stm32f103

Posted: Wed Jun 03, 2020 1:38 pm
by fpiSTM
Thanks for sharing

Note: I move it under Libraries forum of LibMaple.

Re: New CAN Bus Library for the stm32f103

Posted: Wed Jun 03, 2020 3:34 pm
by stevestrong
I don't think that it is for libmaple.
Under "Instalation" is stated:
The library was developed using Platformio and STM32duino
.

Re: New CAN Bus Library for the stm32f103

Posted: Wed Jun 03, 2020 3:49 pm
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...

Re: New CAN Bus Library for the stm32f103

Posted: Wed Jun 03, 2020 3:56 pm
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-)

Re: New CAN Bus Library for the stm32f103

Posted: Wed Jun 03, 2020 3:59 pm
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...

Re: New CAN Bus Library for the stm32f103

Posted: Wed Jun 03, 2020 4:02 pm
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.

Re: New CAN Bus Library for the stm32f103

Posted: Wed Jun 03, 2020 4:05 pm
by fpiSTM
Right, anyway I think you are right.

Re: New CAN Bus Library for the stm32f103

Posted: Wed Jun 03, 2020 11:41 pm
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).

Re: New CAN Bus Library for the stm32f103

Posted: Tue Jul 07, 2020 2:23 am
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