Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

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


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner