FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [November 2009 Threads] MPU on cortex-m3Posted 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-m3Posted 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-m3Posted 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-m3Posted 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-m3Posted 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-m3Posted 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-m3Posted by Dima Suslov on December 9, 2010 That's greate. Thanks!
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|