Using GPIO port B

Discussion created by ashkanrezaee on May 9, 2018
Latest reply on May 13, 2018 by ashkanrezaee

Hi, i try to use GPIO B as an output, but the port didn't work and I don't know why.

These are my definitions:


#define PB00 0U
#define PB01 1U


These are my pin configuration:

GPIO_PinInit(BOARD_GPIO_B, PB00, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0U});
GPIO_PinInit(BOARD_GPIO_B, PB01, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0U});


And then in the "if" command I wrote:

if ((X == 0U)&&(Y == 1U)) {
GPIO_SetPinsOutput(BOARD_GPIO_B, 1U << PB00);
GPIO_SetPinsOutput(BOARD_GPIO_B, 1U << PB01);

else if (Y == 0U) {

GPIO_ClearPinsOutput(BOARD_GPIO_B, 0U << PB00);
GPIO_ClearPinsOutput(BOARD_GPIO_B, 0U << PB01);


Port A and LEDs work correctly but port B and GPIO B doesn't work.

I use MCUXpresso IDE and qn9080-DK.