[STM32G0B1KBU7N] GPIO not working
Not sure what is going on, im unable to toggle an IO and im not sure why...
This is a very simply custom board, it uses I2C, CAN and USB. I've configured everything in CubeMX and double checked the pinout and gerber files several times but i can't find anything wrong. I've double checked the voltages on VDD and VDDIO2, both are 3.3V.
I've tried configuring PD2 as Push-Pull and Open drain with and without pull-up but i get no change on the pin when measuring with my scope.
PD2 is connected to the CAN STBY pin that has an internal pull-up, the pin remains high when the PHY is connected and low when the PHY is disconnected. This would indicate that there is no short on the board and that the electrical part is fine.
I have physically probed the connections on the board and they are correct.
What am i missing, do i need to configure something else?
Below is the minimum CubeMX project. I2C and the EXTI work fine but PD2 does not.


int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_I2C1_Init();
MX_FDCAN1_Init();
/* USER CODE BEGIN 2 */
while(1){
HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_2);
HAL_Delay(500);
}
}
