NUCLEO-L4R5ZI board CN12 header Pin76 = PG7, pin66 = PG8, config as GPIO output pins, but cannot toggle these two pins, SB130 and SB131 have been removed from the board.
NUCLEO-L4R5ZI board, CN12 header: Pin76 = PG7, pin66 = PG8.
SB130 and SB131 have been removed from the board.
config PG7, PG8 as GPIO output pins, but cannot toggle these two pins
Here is the code:
GPIO_InitTypeDef GPIO_InitStructure = {0};
__HAL_RCC_GPIOG_CLK_ENABLE();
GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_7 | GPIO_PIN_8;
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStructure.Pull = GPIO_NOPULL;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_1, GPIO_PIN_RESET); // set to LOW, OK
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_1, GPIO_PIN_SET); // set to HIGH, OK. PG1 toggles OK.
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_7, GPIO_PIN_RESET); // LOW. PG7 always low
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_7, GPIO_PIN_SET); // set to HIGH, PG7 always low (measured), cannot set to high!
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_8, GPIO_PIN_RESET); // LOW. PG8 always low
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_8, GPIO_PIN_SET); // set to HIGH, PG8 always low (measured), cannot set to high!
Note: (1) PG0, and PG1 pins can set/toggle correctly.
(2) PG7 and PG8 cannot set/toggle correctly.
Thanks.

