Quality RTOS & Embedded Software

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




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) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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