Pumpkin, Inc.

Pumpkin User Forums

OS_Delay and OS_Yield not working

For issues specific to Atmel's AVR and MegaAVR microcontrollers, including Atmel AVRStudio and ImageCraft's ICCAVR C compiler.

OS_Delay and OS_Yield not working

Postby alager » Mon Aug 02, 2010 3:32 pm

I've verified that my OSTimer() is called every 2ms via hardware interrupt, but my tasks seem to run as fast as they can:
Code: Select all
void TaskCount( void ){
    while (1) {
        counter++;
        PORTD ^= BIT(PD6); <--toggles every 300us, not every 12ms.
        OS_Delay(DELAY_12MS);
    }
}


My salvocfg.h looks like:
Code: Select all
#define OSUSE_LIBRARY       TRUE
#define OSLIBRARY_TYPE      OSF
#define OSLIBRARY_CONFIG    OSA
#define OSEVENTS            1
#define OSEVENT_FLAGS       1
#define OSMESSAGE_QUEUES    1
#define OSTASKS             3

and I've tried both the libsalvoficcatm128-t.a and the libsalvoliccatm128-y.a. The tiny version will actually cause both tasks to get some CPU time, but the -t version only gives the first task CPU time. But in either case, task 1 runs as fast as it can.
I'm using an ATMega64.

Any ideas?
Thanks,
Aaron
alager
 
Posts: 2
Joined: Mon Jul 19, 2010 1:25 pm

Return to Atmel AVR and MegaAVR

Who is online

Users browsing this forum: No registered users and 0 guests

cron