Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

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?

Thanks!


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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists