qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 5/7] STM32F205: Connect the ADC devices


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3 5/7] STM32F205: Connect the ADC devices
Date: Mon, 22 Feb 2016 00:29:14 +0000

On 21 February 2016 at 23:35, Alistair Francis <address@hidden> wrote:
> On Tue, Feb 2, 2016 at 7:27 AM, Peter Maydell <address@hidden> wrote:
>> On 19 January 2016 at 07:23, Alistair Francis <address@hidden> wrote:
>> You can't just wire multiple irq lines up like this; I think if
>> you do then if devices A and B both assert the IRQ and then A
>> deasserts it, then the receiving device will see an IRQ deassert
>> when it should not (since B still holds it high).
>
> I can't figure out if that is how HW actually does it. I can't find
> too much in the data sheet on how these interrupts behave.
>
> In saying that, I am fine with what you described being the behaviour.
> I don't know any better way to connect the 3 devices to one interrupt
> line. Do you have any suggestions?

You're right that the data sheet is unclear, but I think the
only vaguely plausible setup is that the three lines are ORed
together. That way if any ADC asserts the line then the guest
presumably looks at all of them to find which one has asserted
it, and then writes to the register to acknowledge the interrupt.
So if two ADCs assert at the same time, the guest will still
(correctly) see an interrupt until it acks the second ADC.

Unfortunately we don't have a qemu_irq OR gate at the moment
I think, but it's a pretty simple thing to write.

thanks
-- PMM



reply via email to

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