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 _______________________________________________ AVR-chat mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-chat
