[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BSP for 405EX
- Date: Thu, 01 May 2008 10:37:55 -0700
- From: strauman at slac.stanford.edu (Till Straumann)
- Subject: BSP for 405EX
Nigel Spon wrote:
> On 29/03/2008, at 1:36 PM, Till Straumann wrote:
>> I'd like to add my 2 cents here; recently a framework for supporting
>> and interrupts has been added under
>> please consider using that framework rather than deriving your own
> I have made a start on BSP for the 405GP/405EX which uses the
> bspsupport code,
> and it is basically working. However, it looks as though I may be
> losing interrupts and I suspect I have not implemented
> BSP_enable_irq_at_pic or C_dispatch_irq_handler correctly.
Could you attach a copy (you could post to me privately)?
> My question is, should I be expecting BSP_disable_irq_at_pic to be
> potentially called from within the interrupt handlers called by
Potentially, yes. ISRs should be allowed to call
BSP_disable_irq_at_pic() but the bspsupport
framework itself only calls
BSP_enable_irq_at_pic/BSP_disable_irq_at_pic() during initialization
of the manager and when interrupts are installed/removed.
> If so, the implementation of BSP_disable_irq_at_pic can't just write
> to the PIC hardware, because the PIC hardware has to be used to
> inhibit any level-sensitive interrupts from recurring the moment
> bsp_irq_dispatch_list re-enables interrupts - because the interrupt
> handlers haven't cleared the source yet. The exact sequence of events
> at this point then gets a bit tricky...
> " The boy stood on the burning deck, whence all but he had fled!
> Michael Hamel
> ADInstruments Ltd, Dunedin, NZ