Other Parts Discussed in Thread: C2000WARE
Hello Guys,
we have an issue with the INIT of GPIO23 as output GPIO.
From technical reference manual for 28004X: TMS320F28004x Technical Reference Manual sprui33a.pdf
NOTE: GPIO22 and GPIO23 are in a special analog mode at reset, and must be reconfigured for GPIO use by clearing their bits in GPAAMSEL.
I verified DCDCCTL: DCDCEN = 0x00 ( DC-DC not used ).
My code is as following:
ANALOG_Subsystem.DCDCCTL.AsWord &= ~0x0001; // Write 0 to enable bit.
IOModule.GPIO_CTRL.GPAAMSEL.Items.GPIO_23 = 0;
IOModule.GPIO_CTRL.GPAODR.Items.GPIO_23 = 0;
IOModule.GPIO_CTRL.GPAPUD.Items.GPIO_23 = GPIO_PU_DISABLE;
IOModule.GPIO_CTRL.GPAGMUX2.Items.GPIO_23 = 0;
IOModule.GPIO_CTRL.GPAMUX2.Items.GPIO_23 = 0; // use as I/O
IOModule.GPIO_CTRL.GPADIR.Items.GPIO_23 = 1;
But it seems the output is not working as expected. Clearing or toggling is not executed by the pin.
For GPIO22 I did succeed with the same procedure.
Where I'm wrong or what did I miss?
Thanks in advance,
Marco