mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 06:33:59 -06:00
avr: Do not use Idle mode
The AVR chips (bizarrely) start an ADC conversion when entering Idle mode. This behavior can cause the ADC to be busy when a sample is required. Worse, if a series of events cause the cpu to enter and leave Idle mode with a timing similar to the ADC checking rate then it can cause the ADC to show as busy for extended periods. This could cause high MCU load and possibly lead to a "Rescheduled timer in the past" shutdown. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
46cf3ef145
commit
4a8f9407b8
2 changed files with 1 additions and 9 deletions
|
@ -29,7 +29,7 @@ static inline void irq_restore(irqstatus_t flag) {
|
|||
}
|
||||
|
||||
static inline void irq_wait(void) {
|
||||
asm("sei\n sleep\n cli" : : : "memory");
|
||||
asm("sei\n nop\n cli" : : : "memory");
|
||||
}
|
||||
|
||||
static inline void irq_poll(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue