Solved
STM32G0B0 writing to PD1 affects PD0
I am running into an issue with the STM32G0B0 MCU:
Writing to PD1 seems to result in the opposite value being somehow applied to PD0, even though PD0 is set to input.
Effectively, I created a new project in STM32CubeIDE, configured PD0 & PD2 as GPIO_Input (with pullup enabled) and PD1 as GPIO_Output.
Next, I added the following code to the main function:
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
for (int i = 0; i < 100000; ++i)
{
}
GPIOD->BSRR = GPIO_PIN_1;
for (int i = 0; i < 100000; ++i)
{
}
GPIOD->BRR = GPIO_PIN_1;
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
Running this code on the MCU (the board is effectively empty: There are some bypass caps next to the power pins & two pullup on a couple of other, unrelated pins) results in the following output on the two pins:

PD2 is DIO5, PD1 is DIO6, PD0 is DIO7. I have reproduced this behavior on 4 different boards by now.
What is going on here? Why is the input pin being affected by the output pin? How can I fix this?