CommunityGD32Cores / gd32-pio-projects

PlatformIO test projects for the new GD32 platform and arduino core
42 stars 10 forks source link

Can bus example #7

Open Zharv opened 2 years ago

Zharv commented 2 years ago

Add gd32-spl-can example please Thanks

maxgerhardt commented 2 years ago

Can you point to a specific one for a chip series? Like https://github.com/CommunityGD32Cores/gigadevice-firmware-and-docs/tree/main/GD32F1x0/GD32F1x0_Firmware_Library_V3.3.2/Examples/CAN?

Zharv commented 2 years ago

Hi @maxgerhardt I buy Chinese CAN filter builded from GD32F105RBT6 chip. I need 2 CAN bus communication. Your document will help me, thanks

maxgerhardt commented 2 years ago

Can you link to which board exactly that is?

You should be using an example from https://github.com/CommunityGD32Cores/gigadevice-firmware-and-docs/tree/main/GD32F10x/GD32F10x_Firmware_Library_V2.2.2/Examples/CAN for a F10x chip. (Above is F1x0)

Zharv commented 2 years ago

O1CN01JGSzPf243wHvBi6EX_!!0-fleamarket

Usually these boards were on STM32F105, but now they can also be found on sale on the GD32F105.

You can search on aliexpress "can filter"

maxgerhardt commented 2 years ago

The GD32F105 should be binary backwards compatible to the STM32F105, so you can technically use STM32Duino and all the regular CAN libraries for it (like https://github.com/vell001/STM32CAN). Though due to licensing terms ("code is only to be run on genuine STM32 devices"), you also technically forbidden to do that.

We will add a "native" CAN SPL example here.