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] [February 2006 Threads] 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|