Quality RTOS & Embedded Software

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




Loading

Changes to port ATmega323 to ATmega128

Posted by Richard Purvey on February 23, 2005
As above. Are any changes required? Apart from the obvious like changing the MCU definition in the makefile.

My demo application with two tasks seems to work fine in the simulator in AVRStudio.

RE: Changes to port ATmega323 to ATmega128

Posted by Richard on February 23, 2005
The adaptor for the STK500 that allows the use of the ATMega128 is a little prohibitive, so I have never tried it, but I know there are several people using the 128.

Here is a copy of the WEB documentation on useing a different device:

+ Change the MCU definition at the top of the makefile.

+ Set the correct clock frequency in PortMacro. h
Ensure the portTOTAL_HEAP_SIZE definition is set to fit within the available RAM.

+ The tick ISR is generated from a compare match on timer 1. Timer configuration is not identical across all AVR devices. Check the function prvSetupTimerInterrupt() in Source\portable\GCC\ATMega323\port.c to see if any modifications are required for your chosen device.

+ Whichever part is used, ensure the MCU fuses are blown to provide the correct clock frequency (this can be done from the AVR Studio development tools).


The 323 is one of the older devices and I am told that the timer and serial port register settings are a bit different on the newer versions. You might just need to check that the timer gets setup correctly for the 128 (as mentioned above). Having said that I got an ATMega32 (newer version of the 323) to try this out and found the code executed without any changes at all - which defeated the object of getting it!

There was once a thread that said the integer math demo tasks generated some incorrect calculation results on the 128 - but I don't know what the resolution of this was. The thread was never completed so I assume the author found the problem.



RE: Changes to port ATmega323 to ATmega128

Posted by Richard Purvey on February 23, 2005
As I said it seems to work ok just using the 323 port in the AVRStudio simulator. Will double check the timer configuration though.

Cheers

RE: Changes to port ATmega323 to ATmega128

Posted by Richard Purvey on March 3, 2005
Just to confirm for anybody else looking at this thread that the timer configuration is fine and the ATmega323 port works on the ATmega128 without any changes, apart from the clock frequency.


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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