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

ATSAM3S4A FRTScore 8.2.3 + freertos-spi interface layer(service) (AtmelStudio 6.2)

Posted by andreyserg3 on December 6, 2015

Hello, i'm newbie in FreeRTOS. There are ATMEL Studio 6.2 , core FRTOS 8.2.3, board based on ATSAM3S4A (not dev board) . I create new project , then added frm ASF Wizard freertos-spi(UART,TWI) interface layer(service) , replace a core 7.3.0 (wich added automatically ) with FRTOS 8.2.3, and for the first i make up only 1 task wich using uxTaskGetNumberOfTasks, vTaskList and output info to UART0, it's work fine, then i add SPI func. - freertosspiwritepacket ,it became crashing in xQueueGiveFromISR func. configASSERT( !( ( pxQueue->uxQueueType == queueQUEUEIS_MUTEX ) && ( pxQueue->pxMutexHolder != NULL ) ) ); FreeRTOSconfig: http://textuploader.com/5u50n simpl. CODE : http://textuploader.com/5u5r6 STACK: http://postimg.org/image/o0znwes4v/


ATSAM3S4A FRTScore 8.2.3 + freertos-spi interface layer(service) (AtmelStudio 6.2)

Posted by rtel on December 6, 2015

This is due to a change in the way mutexes can be used. Try updating the ASF code so it creates a binary semaphore (xSemaphoreCreateBinary()) instead of a mutex (xSemaphoreCreateMutex()).

http://www.freertos.org/FreeRTOSSupportForumArchive/April2015/freertos8.2.1queue.cvsASF3.21.0freertosspimaster.c_788182fdj.html


ATSAM3S4A FRTScore 8.2.3 + freertos-spi interface layer(service) (AtmelStudio 6.2)

Posted by andreyserg3 on December 7, 2015

Ok , i change in 2 places to xSemaphoreCreateBinary(), but now func freertosspiwritepacket return ERRTIMEOUT(-3) in ~~~~ freertosperipheralcontrol.c freertosobtainperipheralaccessmutex(freertosdmaeventcontrolt dmaeventcontrol,portTickType *maxblocktimeticks) {statuscodet returnvalue = STATUSOK; xTimeOutType timeoutdefinition; if (dmaeventcontrol->peripheralaccess_mutex != NULL) { / Remember the time on entry. / vTaskSetTimeOutState(&timeoutdefinition); / Wait to get exclusive access to the peripheral. / if(xSemaphoreTake(dmaeventcontrol->peripheralaccessmutex,maxblocktimeticks) == pdFAIL) { returnvalue = ERRTIMEOUT; <-- COMING HERE } else {/* Adjust the time out value in case the task had to block to wait for the semaphore. */ if (xTaskCheckForTimeOut(&timeoutdefinition,maxblocktimeticks) == pdTRUE) {*maxblocktimeticks = 0;} } }return returnvalue;} ~~~~ The same project with FREERTOS 7.3.0 Library Work fine - return Status_OK(0)


ATSAM3S4A FRTScore 8.2.3 + freertos-spi interface layer(service) (AtmelStudio 6.2)

Posted by rtel on December 7, 2015

If the 7.3.0 code works with the binary semaphore, but the 8.2.3 doesn't then I will need to dig a little deeper...


ATSAM3S4A FRTScore 8.2.3 + freertos-spi interface layer(service) (AtmelStudio 6.2)

Posted by andreyserg3 on December 7, 2015

Tryed to use version 8.1.2 with default ASF -ALL OK , So I will use it, thanks for fast support!


[ 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