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

STM32 CortexM3 demo.

Posted by GregK on April 16, 2010
Hi

Seem to in demo config for STM32 CortexM3 arch is small bug (rather non consistency) but without side effects.

In FreeRTOSConfig.h

#define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xb0, or priority 11. */

According http://www.st.com/stonline/products/literature/pm/15491.pdf page 20,
in BASEPRI only bits 7:4 are valid. So I expect rather:

#define configMAX_SYSCALL_INTERRUPT_PRIORITY (11U<<4U) /* equivalent to 0xb0, or priority 11. */
11U<<4U is 0xB0, what is also priority 11.

It is equivalent of 191 (0xBF), since from documentation bits 3:0 are reserved.

Regards


RE: STM32 CortexM3 demo.

Posted by Richard on April 16, 2010
The Cortex M3 is designed with 'forward compatibility' in mind (sounds like their marketing dept. got involved in that). This is why the interrupt mechanism is so confusing. The Cortex M3 itself has 8 bits of priority, but different implementations use a different number of bits. In the interest of 'forward compatibility' it is the most significant bits that are actually used, the idea being that code will be portable to future revisions of the cpu that might implement more bits.

The way the code is written is deliberate, and fine as it is. A lot of this code was written before the CMSIS stuff existed, and before most of the documentation on the CM3 was publicly available.

Regards.

RE: STM32 CortexM3 demo.

Posted by GregK on April 16, 2010
Catch point, thanks.


PS.
I expected something better documented like:
((11U<<4U) | 0x0FU)

RE: STM32 CortexM3 demo.

Posted by Richard on April 16, 2010
“I expected something better documented like:
((11U<<4U) | 0x0FU)”


I presume you mean that to be 0xF0, not 0x0F?

That would also depend on where the definition was used. In some cases (like in inline asm code) it cannot be written that way.

Regards.


[ 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