Files
microchip-application-pec93…/Examples/gpio/gpio_toggle

GPIO toggle

The example is used to toggle gpio.

  • Select GPIO Portx
    // at main.c
    /**
     *  Select toggle pin
     */
    #define GPIO_PORTx  GPIOA
    #define GPIO_Pinx   GPIO_Pin_00
    

Note:

  • If you want to toggle PB1, set IO to normal IO.(RST pin by default)
    SYSCFG_SetRstPin2NormalIO(true);   // set RST IO to normal IO
    
  • If you want to toggle PB[2:5], set IO to normal IO, and Restore IO to JTAG IO at the end.(JTAG pin by default)
    SYSCFG_SetICEPin2NormalIO(true);   // set JTAG IO to normal IO
    SYSCFG_SetICEPin2NormalIO(false);  // set normal IO to JTAG IO