GithubHelp home page GithubHelp logo

k20_apalis_tk1_bare_metal's Introduction

Bare metal firmware for Toradex Apalis TK1

The Toradex Apalis TK1 is a Computer-on-Module based on the NVIDIA Tegra K1 SoC.

The Tegra K1 SoC features a quad-core Cortex-A15 CPU and a NVIDIA Kepler GPU with 192 CUDA cores.

The Apalis TK1 Computer-on-Module features a NXP Kinetis K20 (MK20DN512VMC10) companion MCU connected to the Tegra K1 SoC to provide additional peripherals (ADC, CAN, Touch screen controller).

The default firmware on the K20 MCU is based on FreeRTOS and acts as an intermediate layer between the K20 hardware and the Linux drivers, gathering peripheral data on assigned tasks and sending the information via SPI to the Tegra K1.

A Linux Kernel driver abstracts the incoming SPI data from the K20 MCU and makes use of default Linux Kernel drivers (such as Industrial I/O to provide seamsless access to the peripherals.

Why, though?

A quick-and-dirty solution for these particular cases is to give up the Linux abstraction features provided by the RTOS firmware and implement an interrupt-driven bare metal application to capture data, store it e.g. in a buffer and send it via the SPI bus.

This project is based on the repository for the default Toradex K20 FreeRTOS firmware linked above. It is based on the Kinetis SDK V2.0.

How the hell does this work?

Basically, for each ADC peripheral, we're using two DMA channels. Also, a single timer is used to trigger the ADC conversions. One DMA channel is responsible for writing the ADC result to memory. Using the DMA Link feature, once the memory is written, another DMA channel changes the ADC channel for the next reading.

For a more in-depth explanation of how this works (for a single ADC peripheral), read this.

We've added the possibility of reading two ADC peripherals (ADC0 and ADC1). Basically, the application flow is "doubled". Since the ADCs and the DMAs are separate peripherals, they all run "in parallel" and use the same timer.

k20_apalis_tk1_bare_metal's People

Contributors

faverosantos avatar gustavsl avatar leograba avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

emersonjvs

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.