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


FreeRTOS 7.0.0 typo?

Posted by fdwa on April 14, 2011
Just tested out 7.0.0 (from 6.1.1, transition works great!) and had a quick look at the new STM32F100 demo. In its brand-new FreeRTOSConfig.h, there is

/* Priority 5, or 160 as only the top three bits are implemented. */

Seems that someone finally stumbled over those neat inversed priorities :)
As lowest priority 15 equals 240 (top three bits), I think there should be written either priority 5 aka 80 (top three bits), or priority 10 aka 160 (top three bits). Don't know which one was intended now.


RE: FreeRTOS 7.0.0 typo?

Posted by fdwa on April 14, 2011
Hm, now I am more confused. What does "top three bits", which I also stupidly copied from the header file, mean? For priorities in 0..15 (high..low), there are 4 bits needed. Am I completely wrong now?

RE: FreeRTOS 7.0.0 typo?

Posted by Richard on April 14, 2011
Opps. Cut and paste is the route of all evil. Some CM3 chips only implement three bits of priority.

The code itself is I think correct, but the comment incorrect.

The top *four* bits are implemented, so priority 5 in binary is 01011111, with the low (unimplemented) four bits set to 1 for future compatibility (if the chip implements more bits in the future). 01011111 (binary) = 95 (decimal), therefore the comment should read:

"/* Priority 5, or 95 as only the top four bits are implemented. */"

do you agree with that? I have changed it in SVN already, so let me know if you don't agree.


RE: FreeRTOS 7.0.0 typo?

Posted by fdwa on April 14, 2011
OK, thanks Richard. Though the "STM32F10xxx Cortex-M3 programming manual" (PM0056, p. 126) says that bits [3:0] of a NVIC_IPRx byte always read zero, it's indeed better for compatibility.


[ 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