OpenCyphal-Garage / platform_specific_components

Low-level components and hardware drivers for various Cyphal-related projects
https://opencyphal.org
MIT License
72 stars 40 forks source link

[UAVCAN/CAN] Create STM32 FDCAN Driver #9

Open thirtytwobits opened 5 years ago

thirtytwobits commented 5 years ago

Create a driver for FD reference board: STM32H743 Nucleo-144 (ST micro)

dagar commented 4 years ago

For reference @JacobCrabill added this legacy libuavcan stm32h7 driver in PX4. https://github.com/PX4/Firmware/tree/master/src/drivers/uavcan/uavcan_drivers/stm32h7/driver

pavel-kirienko commented 4 years ago

Nice.

@dagar can we adapt it to support CAN FD (it seems to support only Classic CAN at the moment) and refactor it to remove dependencies on Libuavcan v0? Much like we did for bxCAN. That would be super useful.

JacobCrabill commented 4 years ago

I'm actually (slowly) going through the process of adding Socket can support for the H7 series in Nuttx; I can make my WIP public if it speeds things up.

pavel-kirienko commented 4 years ago

It might, but what we really need is someone willing to do the actual work of extracting the low-level logic from the v0/NuttX driver into a separate reusable component.

JacobCrabill commented 4 years ago

@pavel-kirienko I guess your goal here is to have a standalone set of files to put into any generic project, not just NuttX / PX4? I think the long-term goal for PX4 is to simply have all the drivers built into NuttX; that's the approach taken by @PetervdPerk-NXP for the UAVCAN v1 test setup on the NXP CAN boards, and it makes sense to me. I don't think it would be too difficult to take what I put together (based on the outline of your bxCAN driver) and make it libuavcan-independent.

agribov commented 12 months ago

Has anyone developed a fdcan driver compatible with libuavcan/libcanard?

PetervdPerk-NXP commented 12 months ago

Under NuttX there's Cyphal support which uses the SocketCAN api. S32K1XX, S32K3XX and IMXRT suport CAN FD through this. https://github.com/apache/nuttx-apps/blob/master/examples/opencyphal/canard_main.c

aentinger commented 12 months ago

Has anyone developed a fdcan driver compatible with libuavcan/libcanard?

Are you looking for a CAN FD HAL driver, i.e. for specific MCU platform? Or do you want to use libcanard with CAN FD?

The 107-Arduino-Systems would support CAN FD frames via libcanard (and can be cross-compiled via CMake for any target platform - not limited to the Arduino ecosystem).