|
|
Rockbox mail archiveSubject: Re: Sansa (PP502x?) GPIO interrupts in rockbox softwareRe: Sansa (PP502x?) GPIO interrupts in rockbox software
From: Michael Sevakis <jethead71_at_sbcglobal.net>
Date: Wed, 9 May 2007 00:55:34 -0400
It seems you set CPU_INT_EN = 0xc000000 and CPU_HI_INT_EN = 0x40. GPIOH_INT_EN = 0xc0 ... and I'm checking positive on GPIOH_INT_STAT & 0xc0 !!! It's dyning out cause I'm not doing everything right and the interrupt handler is just setup to shut off the scrollwheel light when it gets a wheel interrupt. Well, the light shuts off when I turn the wheel. :D
----- Original Message -----
Yes, the CPU/COP_INT_EN are write only to my understanding. The results of these operations can be evaluated in the CPU/COP_INT_EN_STAT. I have no idea, why on the PP5020 this doesn't work. What I also don't understand is, that beside CPU-/COP-registers there is a third group of unnamed registers (INT_STAT etc).
Yes, I did the same dump for the cpu interrupts, which did not show any anomalies.
The keys definitely change the HI_INT_STAT bit6. So if someone wants to implement key/scrollwheel interrupt handling, the bit6 in the CPU-/COP_HI_INT_EN register should do it.
----- Original Message -----
I find it likely there's some things that must be worked out about the register operation - especially re: the PP5020. Don't you find it odd that frequency scaling requires CPU/COP_INT_EN |= TIMER1_IRQ and not CPU/COP_INT_EN = TIMER1_IRQ to keep timers running? This is of course only supposed to be relevant to PP5020 but a core patch that doesn't bang cpsr constantly finds that IRQs die out and the cores to not wake again in sleep_cores (this really seems to be the reason).
Is this only COP related?
Keys bang cpsr when posting to the message queues via set_irq_level.
Is cpsr really independent on each core? It would seem there's a tie in somehow.
Hopefully this investigation can also help get dual core working on PP5020. Something sounds relevant.
I also noticed from your last bl/fw transition dump that the *_INT_EN registers are sometimes read then written and not just written. Testing a read on them seems to always read zero but that doesn't mean it has no effect.
Another question is: why do interrupts on the COP even read keys? This is not a good condition at all. That code should absolutely be removed. COP_TIMER1 and CPU_TIMER1 and other core specific handlers should be used.
----- Original Message -----
I evaluated the cop interrupts in the current rockbox software:
Page was last modified "Mar 9 2008" The Rockbox Crew |