cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle interrupt on any GPIOs on STM8L152C6?

AKUMA.2
Associate II

Hi,

I am using user key and three more keys to do some work.

Can you please guide me how to assign for the interrupt handler function for particular interrupt on a GPIO?

e.g. I couldn't understand:

What does the numbers like 8, 9, 10, 11 ect represents in the following code?

INTERRUPT_HANDLER(EXTI0_IRQHandler, 😎

{

 /* In order to detect unexpected events during development,

   it is recommended to set a breakpoint on the following instruction.

 */

 while (1);

}

/**

 * @brief External IT PIN1 Interrupt routine.

 *  On User button pressed:

 *  Check if button presse a long time (4-5 sec.) if yes --> Set Autotest

 *  Else update status_machine to pass to next measuremetn.

 *  Update the LCD bar graph

 * @par Parameters:

 * None

 * @retval

 * None

 */

INTERRUPT_HANDLER(EXTI1_IRQHandler, 9)

{

while(1);

}

*/

/**

 * @brief External IT PIN2 Interrupt routine.

 * @par Parameters:

 * None

 * @retval

 * None

 */

INTERRUPT_HANDLER(EXTI2_IRQHandler, 10)

{

 /* In order to detect unexpected events during development,

   it is recommended to set a breakpoint on the following instruction.

 */

 while (1);

}

/**

 * @brief External IT PIN3 Interrupt routine.

 * @par Parameters:

 * None

 * @retval

 * None

 */

INTERRUPT_HANDLER(EXTI3_IRQHandler, 11)

{

 /* In order to detect unexpected events during development,

   it is recommended to set a breakpoint on the following instruction.

 */

 while (1);

}

/**

 * @brief External IT PIN4 Interrupt routine.

 * @par Parameters:

 * None

 * @retval

 * None

 */

INTERRUPT_HANDLER(EXTI4_IRQHandler, 12)

{

 /* In order to detect unexpected events during development,

   it is recommended to set a breakpoint on the following instruction.

 */

 while (1);

}

/**

 * @brief External IT PIN5 Interrupt routine.

 * @par Parameters:

 * None

 * @retval

 * None

 */

INTERRUPT_HANDLER(EXTI5_IRQHandler, 13)

{

 /* In order to detect unexpected events during development,

   it is recommended to set a breakpoint on the following instruction.

 */

 while (1);

}

/**

 * @brief External IT PIN6 Interrupt routine.

 * @par Parameters:

 * None

 * @retval

 * None

 */

INTERRUPT_HANDLER(EXTI6_IRQHandler, 14)

{

 /* In order to detect unexpected events during development,

   it is recommended to set a breakpoint on the following instruction.

 */

 //while (1);

 return;

}

Thanks

Ajeet

0 REPLIES 0