Quality RTOS & Embedded Software

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


Loading

STR71x port disable interrupt?

Posted by Nobody/Anonymous on February 23, 2006
Does the STR71x port run in System Mode, when the scheduler is runing?

The intrinsic keyword __disable_interrupt and __enable_interrup can only be used in supervisor mode.

I want to disable all interrupts, to be able to stop the CPU from accessing the FLASH.

Best regards,

Frank Andersen

RE: STR71x port disable interrupt?

Posted by Nobody/Anonymous on February 23, 2006
The scheduler itself runs in supervisor mode. The tasks run in system mode. Either way I think you can call the intrinsic functions ok.

RE: STR71x port disable interrupt?

Posted by Nobody/Anonymous on February 23, 2006
Well forgot to write that I am using the IAR compiler and the interrupts are not disabled when calling portEnterCritical (__disable_interrupt)

Best regards,

Frank Andersen

RE: STR71x port disable interrupt?

Posted by Nobody/Anonymous on February 23, 2006
So you are calling portENTER_CRITICAL() but interrupts remain enabled?

In the debugger registers window, can you expand the CPSR register and say what the I, F, T and mode bits are set to immediately before and immediately after calling portENTER_CRITICAL();

RE: STR71x port disable interrupt?

Posted by Nobody/Anonymous on February 23, 2006
Yes, the TimerTickInterrupt keeps running.

Mode is not changed when calling portENTER_CRITICAL() it remains in System Mode.

Mode = 0b11111

if I instead call EIC_IRQConfig( DISABLE ); then the interrupts are disabled. So maybe the __disable_interrupt() in the function portENTER_CRITICAL() has to be changed?

Best regards, Frank Andersen

RE: STR71x port disable interrupt?

Posted by Richard on February 23, 2006
I just tried this on my STR712F. Stepping into the enter/exit critical section functions I can see the I bit in the status register change when the disable_interrupts and enable_interrupts intrinsic functions are called.

Have you changed any build options? Looking in the header files the intrinsic functions have several conditional compilations around them.

Regards.

RE: STR71x port disable interrupt?

Posted by Nobody/Anonymous on February 24, 2006
Ok, just tried to look at the I bit in the CPSR register and you right they do change.

All thoug it is stated in IAR manual that __disable_interrupt and __enable_interrupt only works in supervisor mode.

It puzzel me how the interrupts are enabled if I only call portENTER_CRITICAL(); from within a task.

I steped thru the code and found in YeildProcessor that when restorecontex in called the CriticalNesting is set zero, is that correct.

I have not changed any build options.

Best regards, Frank Andersen

RE: STR71x port disable interrupt?

Posted by Nobody/Anonymous on February 24, 2006
each task has its own critical nesting value so restoring the context of a task can set the value to zero. this is right.


[ 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.

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