BSP for 405EX

Till Straumann strauman at slac.stanford.edu
Thu May 1 17:37:55 UTC 2008


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 
>> exceptions
>> and interrupts has been added under
>>
>> libcpu/powerpc/new-exceptions/bspsupport
>>
>> please consider using that framework rather than deriving your own 
>> variants
>> from
>>
>> libbsp/powerpc/shared/irq/irq_asm.S
>> libbsp/powerpc/shared/vectors/vectors.S
>> libbsp/powerpc/virtex/irq_init.c
>> etc.
>
>
> I have made a start on BSP for the 405GP/405EX which uses the 
> bspsupport code, 
great
> 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 
> bsp_irq_dispatch_list?
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.

T.
> 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...
>
> Thanks,
>
> ---
> " The boy stood on the burning deck, whence all but he had fled!
> Twit."
>
> Michael Hamel
> ADInstruments Ltd, Dunedin, NZ
>





More information about the users mailing list