We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I am a complete beginner when it comes to keil, but I want to learn. However I stumble upon different stuff and get stuck, so I thought it was about time to ask for some help.
I work on MCBSTR9 (ARM STR912FW44) and I would like to make something simple: when I press one interrupt button on the board to light up some of the LEDs and when I press the other interrupt button to light some of the other LEDs.
From what I read I can use the interrupt handlers and all I would have to do is write code in the following function:
void WIU_IRQHandler(void) { }
This function is found in the 91x_it.c file.
I found these functions for handling interrupts: VIC_DeInit = Deinitializes the VIC module registers to their default reset values. VIC_GetIRQStatus = Gets the status of interrupts after IRQ masking. VIC_GetFIQStatus = Gets the status of interrupts after FIQ masking. VIC_GetSourceITStatus = Gets the status of the source interrupts before masking. VIC_ITCmd = Enables or disables the interrupt request lines. VIC_SWITConfig = Generates a software interrupt for the specific source interrupt before interrupt masking. VIC_ProtectionCmd = Enables or disables the register access protection. VIC_GetCurrentISRAdd = Gets the address of the currently active ISR. VIC_GetISRVectAdd = Gets the ISR vector addresses. VIC_Config = Configures the ISR, the line, the mode and the priority for each interrupt.
WIU_Init = Initializes the WIU according to the specified parameters in the WIU_InitTypeDef structure WIU_DeInit = Deinitializes the WIU registers to their default reset values WIU_StructInit = Fills each WIU_InitStruct member with its reset value. WIU_Cmd = Enables or disables the WIU peripheral. WIU_GetITStatus = Checks whether the specified WIU line is asserted or not WIU_ClearITPendingBit = Clears the pending bit of the selected WIU line WIU_GenerateSWInterrupt = Generates a Software interrupt for the specified line WIU_GetFlagStatus = Checks whether the specified WIU line flag is set or not. WIU_ClearFlag = Clears the WIU line pending flag.
I think I managed to configure them, however, I can't figure out how to use these functions in order to find out how to get the specific interrupt I want (pressing one of the 2 buttons on the board). If anyone could also point out how to do this in the simulator I would be really grateful.
Have a great day!