Hi,
This is my first project with a C2000, I have been using various other Microcontrollers.
I tried to set an OUTPUT, then read a connected INPUT right after. How fast is this possible?
Right now I have a huge delay loop (1'000'000 iterations) to make it work.
This is a stripped down example of my code:
EALLOW;
// input setup
GpioCtrlRegs.GPCPUD.bit.GPIO77 = 1; // pullups mounted on board
GpioDataRegs.GPCCLEAR.bit.GPIO77 = 1;
GpioCtrlRegs.GPCMUX1.bit.GPIO77 = 0;
GpioCtrlRegs.GPCDIR.bit.GPIO77 = 0;
// output setup
GpioCtrlRegs.GPCPUD.bit.GPIO73 = 1;
GpioDataRegs.GPCCLEAR.bit.GPIO73 = 1;
GpioCtrlRegs.GPCMUX1.bit.GPIO73 = 0;
GpioCtrlRegs.GPCDIR.bit.GPIO73 = 1;
EDIS;
// set output
GpioDataRegs.GPCSET.bit.GPIO73 = 1
// ...is a delay needed here?
if (GpioDataRegs.GPCDAT.bit.GPIO77)
// output is set
else
// output is cleared