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] [October 2005 Threads] RTOS timing slow on AVR ATMEGA32?Posted by Nobody/Anonymous on October 7, 2005 I use the function vTaskDelay( ( portTickType ) 500 ); to delay the task and to turn on and off a led. I notice that the led is flashing at a slower frequency than expected. In the configuration file the following setup:
configCPU_CLOCK_HZ( ( unsigned portLONG ) 8000000 )
configTICK_RATE_HZ( ( portTickType ) 1000 )
I would think 1ms is one tick?? So a delay of 500 should be half a second??
I'am using an ATMEGA32 with 8Mhz resonator and have CKOPT, SUT0, CKSEL3, CKSEL2, CKSEL1 turned on and programmed with Ponyprog.
RE: RTOS timing slow on AVR ATMEGA32?Posted by Nobody/Anonymous on October 7, 2005 Have you changed the start up code at all? The function prvSetupTimerInterrupt() in port.c? It works exactly for me. I don't know ponyprog, but I suspect a fuse setting problem.
RE: RTOS timing slow on AVR ATMEGA32?Posted by Richard on October 7, 2005 Try to verify the clock setting by toggling an LED within a timer interrupt before starting the scheduler. For example, toggle the LED every 1000 ticks to get a 1 second toggle.
Once you have got the frequency correct try the scheduler test again.
I suspect the clock fuse settings might be incorrect.
Regards.
RE: RTOS timing slow on AVR ATMEGA32?Posted by Nobody/Anonymous on October 7, 2005 Set the clock fuse settings to the Calibrated Internal RC Oscillator at 8Mhz and it is running fine now.
Thanx for comments, Adrian
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|