Atmel website | ARM Community | AVR freaks | Technical Support
Banner
Welcome to AT91SAM Community Forum
http://www.at91.com/samphpbb/

FreeRTOS freezes
http://www.at91.com/samphpbb/viewtopic.php?f=25&t=2260
Page 1 of 1

Author:  myval [ Tue Oct 31, 2006 8:21 pm ]
Post subject:  FreeRTOS freezes

Hi,

I am having strange problem (at least in my point of view).
When I do this:
__arm void vRPM_ISR ( void )
{
xNewRPM = xTaskGetTickCount();

whole freertos kernell freezes.
When I chanege it to this:
__arm void vRPM_ISR ( void )
{

xNewRPM = xTickCount;

everything runs well. So the problem must be in xTaskGetTickCount function in here:
taskENTER_CRITICAL(); and taskEXIT_CRITICAL();

any explanation appreciated
Thanks
Josef

Author:  RichardBarry [ Wed Feb 28, 2007 12:55 am ]
Post subject: 

Only API functions that end in "FromISR" should be used within ISR's. GetTickCount() enters/exits a critical region and cannot therefore be used in an ISR.

Regards,
Richard.

+ http://www.FreeRTOS.org
A free real time kernel for 8, 16 and 32bit systems.

+ http://www.SafeRTOS.com
An IEC 61508 compliant real time kernel for safety related systems.

Author:  Lite [ Tue Sep 16, 2008 3:45 pm ]
Post subject: 

I've had the same problem; so i used
something like this to:

auxTime = xTickCount;

works fine (at least so far)

but is such an instruction safe
without the protection of the critical
region?

Thanks

Author:  RichardBarry [ Tue Sep 16, 2008 4:05 pm ]
Post subject: 

This should be fine as you are reading a 32bit value on a 32bit architecture.

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/