Skip to content

ATmegaxxxx - generalised support - #48

Merged
yuhui-zheng merged 24 commits into
FreeRTOS:masterfrom
feilipu:master
Apr 16, 2020
Merged

ATmegaxxxx - generalised support#48
yuhui-zheng merged 24 commits into
FreeRTOS:masterfrom
feilipu:master

Conversation

@feilipu

@feilipu feilipu commented Apr 7, 2020

Copy link
Copy Markdown
Contributor

ATmegaxxxx

Port for generalised Microchip ATmega architecture

Description

This port provides a basis for supporting all modern ATmega devices using either the Enhanced Watchdog Timer, or Timer0 (an 8-bit Timer generally available across the whole range).

This initial commit contains the information required to build with System Tick being generated by either the:

  • Watchdog Timer, or
  • Timer0 - an 8-bit Timer

Further commits can add support for 16-bit Timers available on many relevant devices. The availability of these 16-bit Timers is somewhat device specific, and these complex and highly configurable Timers are often used to generate phase correct PWM timing (for example) and they would be wasted as a simple System Tick.

The port also provides support for the 3 byte program counter devices ATmega2560 and ATmega2561. Specific to these two devices the RAMPZ and EIND registers need to be preserved during a context switch. Also, due to a limitation in GCC, the scheduler needs to reside in the lower 128kB of flash for both of these devices. This is achieved by adding the .lowtext section attribute to the function prototype.

The ATmega808/809/1608/1609/3208/3209/4808/4809 megaAVR family is a substantial revision of the ATmega platform, and is currently not supported by avr-libc. Therefore the megaAVR 0-series is not supported by this port.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants