Skip to main content

Windows CE Library - SPI via DMA Library (SPIDMALib)

danger

this is a legacy library and thus not supported by Toradex anymore. We recommend that you use the new libraries for all Toradex modules. Please see the Toradex CE Libraries and Code Samples for up-to-date information.


Description

This library manages the SPI interfaces via DMA.

Current Version

V5.3

Application Notes

SPILib supports up to 5 SPI ports on Colibri modules.

For SPILib to function correctly, it is necessary to disable Dynamic Frequecncy Switching (DFS) - See here. In Library revision V5.0 and higher, this is not required anymore, the frequency is automatically increased between SpiInit and SpiDeinit.

For data packets smaller than the FIFO (32 frames on the T20/T30, it is recommended to use the polling mode functions instead of the DMA based functions. They require less overhead to setup a transfer and therefore provide shorter latencies.

Library API

Click here for the library API

Other Resources

Windows CE Libraries Overview

Colibri SPI

Revision History

DateRevChange Notes
30/10/2014V5.3Fix issue on T20/T30 modules: Small SPI transfers using DMA caused the application to freeze.
Fix issue on T20/T30 modules: SPI transfers using DMA caused the application to freeze, if transfer size was not a multiple of 4.
27/05/2014V5.2Non-standard SPI pin configurations can now be defined as GPIO numbers instead of SODIMM pins. This is to support on-module SPI channels, e.g. for the Apalis on-module CAN controllers
Adjust default SPI pin configurations for Apalis
15/04/2014V5.1Add TegSpiSetWaitMethod() to choose between interrput-driven and busyLoop waiting
Use DMA-like SPI control method even in non-DMA mode to prevent possible data loss of received data.
Remove deprecated functions TegWriteSPIUnpacdked() and TegReadSPIUnpacked()
Fix issue that caused a data abort when calling SPIInit() the 2nd time
11/03/2014V5.0Fix bit rate calculation
Pre-allocate memory for DMA, instead of allocating it for each transfer
Performance improvements
Fix pin initialization
23/09/2013V4.1Change default SDK to Colibri600 / Added support for T30's SPI5 and SPI6
12/08/2013V4.0.1Improved performance of SPIReadWritePolling(), SPIReadPolling() and SPIWritePolling() on Tegra processors


Send Feedback!