STM32G0 Workshop - Pt. 4, External Interrupt
Channel: STMicroelectronics
Date: 2019-06-20

This is Part 4 of the STM32G0 Workshop/MOOC.  To view all videos, please view playlist here: http://bit.ly/STM32G0_MOOC

The STM32G0 series is our new general purpose 32-bit microcontrollers offering efficiency, robustness and simplicity. Designers will especially appreciate its pin-to-pin compatibility with the STM32 family and its comprehensive development ecosystem.
For product information: http://bit.ly/STM32G0-product

Course Outline:
 - Overview of the STM32G0 platform including its architecture, key features and main benefits
 - Hands-on experience with real-life application scenarios and operating modes using STM32Cube embedded software
 - How to simplify designs and reduce BOM using the new advanced peripheral set
 - Putting together a complete solution including low-layer APIs and middleware components
 - Tips and tricks to improve the design and performance of embedded applications

Prerequisites:                            
 - The STM32G0 Nucleo board (NUCLEO-G071RB) is required for the hands-on exercises included in the course
 - A good understanding of embedded system development and programing in C
 - Type A to typeB microUSB cable
Laptop PC running Windows® 7, 8 or 10 with administrator rights

COPY & PASTE CODE:
in main.c:

uint8_t PC13_flag = 0;

//////////////////////

void HAL_GPIO_EXTI_Rising_Callback(uint16_t GPIO_Pin)
{
  PC13_flag++;
  if ( ( PC13_flag & 0x01 ) == 0x01 )
  {
    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
  }
  else
  {
    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);        
  }
}