avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] MEGA vs XMEGA core differences?


From: Rick Mann
Subject: [avr-chat] MEGA vs XMEGA core differences?
Date: Sat, 27 Apr 2013 23:12:27 -0700

So, I'm sitting here trying to port ChibiOS to XMEGA. It runs well on something 
like an ATmega128.

And I'm really beginning to wonder, why doesn't it run unmodified on XMEGA? The 
CPU core is the same. Interrupts are a little different, but at this early 
stage, all I'm doing is setting up a timer-based interrupt to hook into the OS 
for its scheduler. XMEGA has the PMIC. ChibiOS uses RET to do the context 
switch, which seems to work fine on MEGA, but on XMEGA, that fails to re-enable 
interrupts.

Doesn't it also not re-enable interrupts on MEGA? How can it work on MEGA and 
not XMEGA?

Does anyone know what differences I might need to look into?

By the way, I changed it to use RETI (for now, that should be ok; in future, I 
need to allow the context switch code to be called from a non-interrupt 
context, in which case it needs to use RET), and although it seems to 
repeatedly interrupt now and make the switch, it's not actually executing all 
the threads; still trying to figure that out.

-- 
Rick






reply via email to

[Prev in Thread] Current Thread [Next in Thread]