Hello together,
I am doing my first steps with the TI F28035 Microcontroller in Code Composer Studio 6.1.3. and I am too stupid to understand, how I can configure a pin as Input or Output properly. I tried the following code to let a LED blink. Note, that I know there is an example code, which also works fine and is much more efficient than the approach I am trying. I just don't want to simply toggle the LED, but I want to set a Pin high or low:
int main(void)
{
// InitGpio();
EALLOW;
// Output
GpioCtrlRegs.GPBMUX1.bit.GPIO34 = 0; // Configure Port 34 as Input/Output
GpioCtrlRegs.GPBDIR.bit.GPIO34 = 1; // Configure Port 34 as Output
//GpioCtrlRegs.GPBPUD.bit.GPIO34 = 0; //Enable internat pullup (is also default)
//GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1;
// GpioDataRegs.GPBDAT.bit.GPIO34=1; // 0 = Low, 1 = High
EDIS;
for(;;)
{
GpioDataRegs.GPBDAT.bit.GPIO34=1; // 0 = Low, 1 = High
// GpioDataRegs.GPBDAT.bit.GPIO34=1;
DELAY_US(1000000);
GpioDataRegs.GPBDAT.bit.GPIO34=0;
DELAY_US(1000000);
// GpioDataRegs.GPBDAT.bit.GPIO34=0;
// DELAY_US(1000000);
}
}
Can somebody tell me, what I am missing? And can somebody tell me, what the GpioIntRegs is for?