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

Startup failure as timers are enabled (MPU)

Posted by Tamir Michael on July 6, 2012
Hello,

I have the MPU enabled (LPC1788), and just added timer.c and followed the instructions as to how to enable timers.
Unfortunately, as the scheduler tries to start the first stack, I get an immediate "unstacking error" from the MPU.
Any thoughts...?

Thanks in advance

RE: Startup failure as timers are enabled (MPU)

Posted by Tamir Michael on July 6, 2012
Can it be related to the kernel using CreateTask rather than CreateTaskRestricted...?

RE: Startup failure as timers are enabled (MPU)

Posted by Richard on July 6, 2012
I have to admit having not tried it, but I have had a quick look now.

Could you try changing the line in prvSampleTimeNow() from

static portTickType xLastTime = ( portTickType ) 0U;


to

PRIVILEGED_DATA static portTickType xLastTime = ( portTickType ) 0U;


and report back. Thanks.

Regards.

RE: Startup failure as timers are enabled (MPU)

Posted by Tamir Michael on July 6, 2012
I added "|portPRIVILEGE_BIT" at the creation of the timers task and that seems to help!

RE: Startup failure as timers are enabled (MPU)

Posted by Richard on July 6, 2012
You beet me to it! I was just about to say when I read your post (that crossed with mine) that you need to set that in your definition of configTIMER_TASK_PRIORITY. The suggested change made in my previous post should be made too.

I think I will change the core code so the ORing with portPRIVILEGE_BIT is done by the kernel too - just like it is for the idle task.

Regards.

RE: Startup failure as timers are enabled (MPU)

Posted by Tamir Michael on July 6, 2012
Thanks.


[ 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