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

MPU on cortex-m3

Posted by Michal Demin on November 30, 2009
Hello

I have successfully compiled and executed the "nonMPU" FreeRTOS 6.0.1 on Cortex-M3.

I am using the xTaskCreate to create process. This proces sets up SPI, DMA, interrups for driving LCD.

But if i change the port from ARM\_CM3 to ARM\_CM3\_MPU the code crashes when trying to setup NVIC.

Is this problem that the 0xE000Exxx (SCS_BASE) addresses are not allowed to be accessed ?

None of the two Demos uses interrupt handling so I assume that this has not been tested :(

Any suggestions ?

RE: MPU on cortex-m3

Posted by Michal Demin on November 30, 2009
I forgot that im using STM32

Anyone knows how is the stm32 behaving when DMA transfer is in progress and i change the content of MPU ?


RE: MPU on cortex-m3

Posted by Richard on November 30, 2009
First, are you sure your STM32 has an MPU?

*If* it does, then I would expect the NVIC registers will be protected. There are a few that you can access without a fault being generated, but without the CPU taking notice of the read or write.

If you want to access the registers then you need to do it from privileged code, this is in the end of the point of the MPU, to protect critical data. You can either setup the NVIC from main() before the scheduler is started, or do it from a privileged task, or do it from a task that is created privileged to allow it to perform this type of setup before being set to User mode to carry out its main function.

Regards.

RE: MPU on cortex-m3

Posted by Michal Demin on November 30, 2009
Thanks for reply.

I didn't notice that MPU is _optional_ for the Cortex-M3. So that's where my problem was.

"Type" register check from GDB confirms my mistake:

print/x *0xe000ed90
$2 = 0x0

Thanks a lot :)

RE: MPU on cortex-m3

Posted by Dima Suslov on December 9, 2010
Hi, Richard!
You wrote "First, are you sure your STM32 has an MPU? "

Yes, today we have a STM32F103VGT6 with MPU.
The question is whether the port for LPC1768 (via GCC) is suitable for this ST MCU?

RE: MPU on cortex-m3

Posted by Richard on December 9, 2010
The port layer for the LPC and STM parts will be the same - its just a matter of creating a project with the correct settings (linker script, LED outputs, etc.) for the STM part.

Regards.

RE: MPU on cortex-m3

Posted by Dima Suslov on December 9, 2010
That's greate. 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