1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Gerson Fernando Budke
783afbc666 cpu/avr8_common: Add AVR8_ISR macro
The current ISR implementation for AVR8 requires use of
avr8_[enter/exit]_isr pair which add some boilerplate on code.
This add AVR8_ISR which clean-up the code and make it simpler
and hides any schedule detail from the user perspective.

This is a preparation for future scheduling and irq optimizations.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-07-05 20:00:19 +02:00
Marian Buschsieweke
35a1b60068
cpu/{atxmega,atmega_common}: fix invalid use of PSTR()
core_panic() doesn't expect the message to be in program memory, but
in data memory. Bad things will happen on AVR when the address is
interpreted as being in data address space, but the allocation is
done in program address space.
2021-09-30 17:15:39 +02:00
Gerson Fernando Budke
93ed3cd9d6 cpu/atxmega: Add periph power management
The current xmega don't have a way to disable peripherals that are
not in used.  Add peripheral management to allow enable only the mcu
blocks that will be used by application.  This saves power on active
and sleep modes.  By default, at clock initialization, all peripherals
are now disabled and each drive must activate at initialization phase.
The periph_timer and periph_uart were updated with this new feature.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-04-02 14:24:31 -03:00
Gerson Fernando Budke
53235dd2e2 cpu/atxmega/atxmega_cpu: Fix clk sel after dfll en
The current ATxmega clock_init enable DFLL to improve the accuracy of
the 2MHz and 32MHz internal oscillators.  In some ATxmega revisions,
after started DFLL the clock become unstable.  Add another sync point
for 32MHz internal oscilator.

Note:  If clock is not stable, system won't switch from 2MHz to 32MHz
as main clock.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-28 11:40:39 -03:00
Gerson Fernando Budke
1a88f0bad6 cpu: Introduce Atmel xmega cpu
Add ATxmega common files and cpu definitions.

This works was originally developed by @Josar.  The 2018 version
were port to 2021 mainline.

This version changes original port to have only the atxmega CPU
definition. With that, all family can be accomodated.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00