Pin Control (Pinctrl)

To configure the pin multiplexing functions, follow the steps below:

  1. Turn off the SWD if the pin default function is SWD, and configure it to other functions.

    Pinmux_Swdoff();
    
  2. Configure pin multiplexing function.

    Pinmux_Config(u8 PinName, u32 PinFunc);
    
  3. Set pin pull type.

    PAD_PullCtrl(u8 PinName, u8 PullType); //normal mode
    PAD_SleepPullCtrl(u8 PinName, u8 PullType); //sleep and deep-sleep mode
    
  4. Set pin driving strength if needed.

    PAD_DrvStrength(u8 PinName, u32 DrvStrength);