How to use local interrupt? #238
-
I use PolarFire SoC Icicle kit and I want to evaluate some program. Specifically, I want to enable any of the local interrupts 0~47 to interrupt when SW1 on the board is pressed. I think that the signal line for interrupts should use MSS_INT_F2M[63:0], but is this correct? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @Usutatsu I'm a bit confused by "not using CLINT" - the CLINT is used for local interrupt generation so you can't really bypass it for this use case. You could use the PLIC or a GPIO for interrupts instead of the CLINT but these are global interrupts not local. You are correct in thinking you can use the MSS_INT_FTM signals - for an example of this have a look at this section of our GPIO interrupt example which shows the MSS_INT_FTM (in this case called FABRIC_F2H_...) driving an interrupt. You will need to configure the PLIC for this to work. If you want to use the local interrupts on the hart (which does use the CLINT) you can use the For examples of how to connect these interrupts have a look at the Icicle Kit Reference Design. |
Beta Was this translation helpful? Give feedback.
-
The Icicle Kit Reference Design is using a 50MHz on board oscillator as the source clock now - this goes into a CCC (Clock Conditioning Circuitry) block to generate the fabric clocks (this can be found in the "CLOCKS_AND_RESETS" SmartDesign): To update the clock frequency if you have a different source clock you need to update the configuration of the CCC: |
Beta Was this translation helpful? Give feedback.
Hi @Usutatsu I'm a bit confused by "not using CLINT" - the CLINT is used for local interrupt generation so you can't really bypass it for this use case. You could use the PLIC or a GPIO for interrupts instead of the CLINT but these are global interrupts not local.
You are correct in thinking you can use the MSS_INT_FTM signals - for an example of this have a look at this section of our GPIO interrupt example which shows the MSS_INT_FTM (in this case called FABRIC_F2H_...) driving an interrupt. You will need to configure the PLIC for this to work.
If you want to use the local interrupts on the hart (which does use the CLINT) you can use the
__enable_local_irq
function that is shown here. J…