Git Product home page Git Product logo

can4vscp_frdm_bm's Introduction

A baremetal port of VSCP firmware to Kinetis

This is one of the pieces of the "EasyIoTwithVSCP" project on the Freescale Community. The first supported platform is the FRDM-K64F, however since the Kinetis SDK is used it is highly portable to other Kinetis devices with a FlexCAN peripheral. If you want to try this code you might want to use a TWR-K6x as the TWR-SER has a CAN transceiver. Alternatively, make a request for a FRDM-CAN-VSCP shield through the Freescale Community.

Known Limitations

Receiving CAN messages can cause a hardfault. This is being looked into and the problem does not exist with MQX, due to what I believe to be more robust transitioning between mailbox states (empty, full, overrun, etc)

Comment out vscp_getEvent() in main.c to prevent hardfaults. The device will report vscp data (die temperature and accelerometer).

Project Requirements

1. Get the vscp firmware and software:

  • git clone https://github.com/grodansparadis/vscp_software
  • git clone https://github.com/grodansparadis/vscp_firmware

2. Install the following free tools from Freescale:

Setup the Freescale tools:
  • Accept the default KSDK installation path, ex. "C:/Freescale" on a Windows machine
  • An update is needed to make the IDE KSDK compatible. To install:
  • Help > Install New Software > Add > Archive > Browse C:/Freescale/KSDK_1.2.0/tools/eclipse_update/KSDK_1.2.0_Eclipse_Update.zip
  • When using the KSDK, we need to link to a platform library which contains hardware and operating system abstraction layers (HAL & OSA), peripheral drivers, and startup code. To Build the platform library:
  • File > Import > General > Existing Projects into Workspace > Next > Browse C:/Freescale/KSDK_1.2.0/lib/ksdk_platform_lib/kds/
  • Don't forget to correct the include path for vscp_firmware/common to match your machine

3. Additional Info

  • To install free debugger + serial emulator firmware on FRDM board MCU on Eclipse
  • Document for setting up a project based on the examples DOC-103288

VSCP logo

Advantages of Kinetis for VSCP

  • FlexCAN hardware masking - If there are 100 sensor nodes talking on the bus, there are many wasted CPU cycles involved in receiving messages through software only to find out that the message isn't for us. For example, a node is generally un-interested in seeing measurements (CLASS=10) from other nodes, but we DO want to know if the segment controller is trying to write to one of our registers (see vscp register model), or has told us to do something like go to sleep, change reporting interval, etc. This is easily accomplished with mailbox masking.
  • RTC Peripheral - VSCP reference FW does limited time keeping through global variables, the Real-Time-Clock (RTC) module allows for high accuracy time keeping in various formats (tick time, POSIX time).
  • Software Enablement - KSDK decreases dependence on the reference manual, and MQX is a complimentary commercial grade RTOS that has been to space and comes with full set of drivers.

This is not meant to be an exhaustive list, just some things I noted during development and wanted to formalize.

can4vscp_frdm_bm's People

Contributors

gallowaa avatar

Watchers

Åke Hedman avatar  avatar

Forkers

grodansparadis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.