Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Example of SPI+DMA / gatekeeper?

Posted by apullin2 on April 10, 2014

I was wondering if there is an example implementation of a "properly" designed gatekeeper task for an SPI peripheral? It would be super helpful to have as a starting reference point.

This is for a dsPIC33F ; we're currently using SPI w/ DMA and installable callbacks to manage access to an SPI bus with a few devices on it. A bunch of time has already been sunk into getting everything to play along well. A proper FreeRTOS port would be a great boon here, but I don't quite have the savvy to translate this into FreeRTOS API/primitives. Any sort of a reference would be great, even if there's a solid block diagram to point me towards, laying out how the interactions for a gatekeeper for an SPI+DMA bus should be arranged.

Surely such a module would be general enough that someone has already written it, and it's out there? And I'd just need to implement the chip-support and board-support?


Example of SPI+DMA / gatekeeper?

Posted by davedoors on April 11, 2014

With SPI it might be better to use mutexes. You can use a mutex to access the SPI and a binary semaphore to signal the end of a transfer. I don't know of any examples specifically for the PIC24, but you can get the idea by looking at the Atmel drivers that use FreeRTOS http://www.atmel.com/images/doc42049.pdf

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner