This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPIO-32 INPUT PORT



can i use GPIO-32 as input?

port intialization: it is correct?

GpioCtrlRegs.GPBMUX1.bit.GPIO32 = 0; // 0=GPIO,  1=I2C-SDA,  2=SYNCI,  3=ADCSOCA

GpioCtrlRegs.GPBDIR.bit.GPIO32 = 0; // 1=OUTput,  0=INput

what register i have to read to test input status of the port? 

thanks Andrea Francalanci

  • Hi Andrea,

    what device are you using?? I am not sure if all c2000 devices do have a gpio32 port... beside this you initialization seems to be correct, don't forget to wrap the two commands into EALLOW; EDIS; to grant acces to the protected registers

    To read the regs you can acces the GpioDataRegs.GPBDAT.bit.GPIO32 register

    Best regards

    Andreas