Hi,
From gio.c generated by HalcoGen:
void gioToggleBit(gioPORT_t *port, uint32 bit)
{
/* USER CODE BEGIN (10) */
/* USER CODE END */
if ((port->DIN & (1U << bit)) != 0U)
{
port->DCLR = 1U << bit;
}
else
{
port->DSET = 1U << bit;
}
}
I believe the comparison line should test port->DOUT instead port->DIN toggling the data written to the port latch. Reading the pin state can fail the function since the actual pin state can be different form the latch depending on pin configuration and the load.
Regards, Dmitri.