Fabric Interface Interrupt Controller
UG0331 User Guide Revision 15.0
748
Example:
The following code illustrates the usage of the MSS to the fabric interrupt in conjunction with
the Timer1 interrupt.
int main()
{
// STEP 1 - Enable Timer1 MSS to Fabric Interrupt (MSS_INT_M2F[10])
INTERRUPT_CTRL_BITBAND->TIMER1_INTR_ENBL = 1;
// STEP 2 - Configure Timer1 in PERIODIC MODE
MSS_TIM1_init(MSS_TIMER_PERIODIC_MODE );
// STEP 3 - Load count value
MSS_TIM1_load_immediate(10000000 );
// STEP 4 - Start Timer1
MSS_TIM1_start();
// STEP 5 - Enable Timer1 Interrupt and IRQ in NVIC
MSS_TIM1_enable_irq();
// Foreground loop
for(;;)
{
;
}
return 0;
}
/*
* Connect MSS_INT_M2F[10] signal to LED.
* Toggle LED on TIM1 interrupt.
*/
__attribute__((__interrupt__)) void Timer1_IRQHandler( void )
{
uint32_t timer1_interrupt;
// Read Timer1 MSS to Fabric Interrupt status
timer1_interrupt = INTERRUPT_CTRL_BITBAND->TIMER1_INTR_STATUS;
// Delay for extending the Timer1 MSS to fabric Interrupt pulse width
delay(10000);
/* Clear TIM1 interrupt */
MSS_TIM1_clear_irq();
}
23.3.2.2.2 Soft Processor in FPGA fabric
If MSS peripheral interrupt sources to be used as an interrupt sources to a soft processor within the
FPGA fabric, the following steps to be implemented in soft processor.
Step 1 - Enabling the MSS to the Fabric interrupt
Set M2F interrupt enable register bit of MSS peripheral in <
> or
<
> registers.
For example, to enable Timer1 MSS to fabric interrupt (MSS_INT_M2F [10]), TIMER1_INTR_ENBL bit in
register must be set.
Содержание SmartFusion2 MSS
Страница 1: ...UG0331 User Guide SmartFusion2 Microcontroller Subsystem ...
Страница 166: ...Cortex M3 Processor Reference Material UG0331 User Guide Revision 15 0 132 ...
Страница 200: ...Embedded NVM eNVM Controllers UG0331 User Guide Revision 15 0 166 Figure 87 System Builder Window ...
Страница 407: ...Universal Serial Bus OTG Controller UG0331 User Guide Revision 15 0 373 ...
Страница 806: ...Fabric Interface Controller UG0331 User Guide Revision 15 0 772 Figure 345 FIC Master AHB Lite Subsystem ...