Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner