Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

OpenCyphal-Garage/libuavcan_kinetis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

libuavcan_kinetis

!!! THIS REPOSITORY HAS MOVED !!!

Libuavcan platform driver for Kinetis FlexCAN

The repository contains the Kinetis FlexCAN platform driver for Libuavcan on NuttX.

Configuation is set by the NuttX board.h for the following:

Driver board.h
OSCERCLK BOARD_EXTAL_FREQ
busclck BOARD_BUS_FREQ

and the following commandline defines:

Setting Description
UAVCAN_KINETIS_NUM_IFACES - {1..2} Sets the number of CAN interfaces the SW will support
UAVCAN_KINETIS_TIMER_NUMBER - {0..3} Sets the Periodic Interrupt Timer (PITn) channel

Things that could be improved:

  1. Support for Bare metal and other OS' (ChibiOS, FREERTOS)
  2. Build time command line configuartion of Mailbox/FIFO and filters
  3. Build time command line configuartion clock source
    • Curently the driver use const uavcan::uint8_t CLOCKSEL = 0; To Select OSCERCLK
  4. Dynamic filter disable. There are no filter enable bits on the FlexCAN, just the number of Filters can be set. But this changes the memory map. So the configuration show below has been chosen.
/* Layout of Fifo, filters and Message buffers  */

enum { FiFo = 0 };
/* 0                       */
/* 1                       */
/* 2                       */
/* 3         Fifo          */
/* 4                       */
/* 5                       */
enum { FirstFilter = 6 };
/* 6                       */
/* 7                       */
/* 8         Filters       */
/* 9                       */
enum { NumHWFilters = 16 };
enum { NumMBinFiFoAndFilters = 10 };
/* 10                      */
/* 11                      */
/* 12                      */
/* 13 Tx Message Buffers   */
/* 14                      */
/* 15                      */
/*-- ----------------------*/

A dedicated example application may be added later here. For now, please consider the following open source projects as a reference: