Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: FreeRTOS freezes
PostPosted: Tue Oct 31, 2006 8:21 pm 
Offline

Joined: Sun Oct 08, 2006 10:33 pm
Posts: 2
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 28, 2007 12:55 am 
Offline

Joined: Mon Jan 03, 2005 8:14 pm
Posts: 16
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2008 3:45 pm 
Offline

Joined: Sun Sep 14, 2008 5:33 pm
Posts: 2
Location: Romania
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2008 4:05 pm 
Offline

Joined: Mon Jan 03, 2005 8:14 pm
Posts: 16
This should be fine as you are reading a 32bit value on a 32bit architecture.

_________________
Regards,
Richard

+ http://www.FreeRTOS.org
23 official architecture ports, 6000 downloads per month


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: