This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Very Urgent :VIC in ARM Cortex R4

Hi all,

It was nice experience working with NXP with my favorite S32K1XX series having ARM Cotex M-4 and M-0+.

 Now i switched to BCM895XX series with ARM Cotex R-4 having VIC for interrupt contolling.

 I am working with controller having ARM cortex R-4 , which supports VIC (PL190) for interrupt controlling. I searched a lot but not satisfied. Now i come here again.

I have few questions:

1- Does VICIRQSTATUS register gives the currently IRQ interrupt servicing by processor.

2. Which status gives the VICRAWINTR register. 

3. I want the current executing interrupt source number( decimal number out of 32 interrupt source ) at run time . I am     only getting the status bit being set in STATUS register . Also I am not getting any register supported by Cortex R-4 to  get the interrupt source number. How I can get this number . 

 

Please  help me on this and also let me know if i have posted this question in wrong category. 

 

 

Thanks!

Parents
  • Hi Yash,

    Please read section 2.2 of PL190 Technical Reference Manual which show expect usages

    http://infocenter.arm.com/help/topic/com.arm.doc.ddi0181e/I1006538.html

    You can either use Vectored interrupt flow (utilized VICADDRESS to determine interrupt vector), or simple interrupt flow (use software to determine interrupt vector).

    I see that you ask about that in

    https://community.arm.com/processors/f/discussions/9701/bit-scan-instruction-arm-cortex-r4

    Using RBIT and CLZ enable to get the IRQ number for the lowest number pending IRQ. But as you noticed, there can be cases where two IRQs can be asserted at the same time. How you define the priority in that case is up to you in software implementation.

    In simple design, I would expect the default handler will:

    - read VICIRQstatus

    - masked out vectored interrupts (as they should be handled by vectored interrupt handlers, not default interrupt handler)

    - use simple branch tress (highest priority IRQ is checked first, then second priority, ...) to decide what to do.

    The VICIRQstatus is clear if:

    - the peripheral deasserted the interrupt, or

    - the interrupt is disabled at PL190.

    Normally your IRQ handler need to clear the interrupt request at the peripheral. Please note there could be a delay from clearing of the interrupt request to the stage that the VICIRQstatus actually get updated (a few clock cycle delay). This is depending on the chip design.

    regards,

    Joseph

Reply
  • Hi Yash,

    Please read section 2.2 of PL190 Technical Reference Manual which show expect usages

    http://infocenter.arm.com/help/topic/com.arm.doc.ddi0181e/I1006538.html

    You can either use Vectored interrupt flow (utilized VICADDRESS to determine interrupt vector), or simple interrupt flow (use software to determine interrupt vector).

    I see that you ask about that in

    https://community.arm.com/processors/f/discussions/9701/bit-scan-instruction-arm-cortex-r4

    Using RBIT and CLZ enable to get the IRQ number for the lowest number pending IRQ. But as you noticed, there can be cases where two IRQs can be asserted at the same time. How you define the priority in that case is up to you in software implementation.

    In simple design, I would expect the default handler will:

    - read VICIRQstatus

    - masked out vectored interrupts (as they should be handled by vectored interrupt handlers, not default interrupt handler)

    - use simple branch tress (highest priority IRQ is checked first, then second priority, ...) to decide what to do.

    The VICIRQstatus is clear if:

    - the peripheral deasserted the interrupt, or

    - the interrupt is disabled at PL190.

    Normally your IRQ handler need to clear the interrupt request at the peripheral. Please note there could be a delay from clearing of the interrupt request to the stage that the VICIRQstatus actually get updated (a few clock cycle delay). This is depending on the chip design.

    regards,

    Joseph

Children