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

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