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.

TMS320F28374D: an issue about F2837xD_Gpio.c

Part Number: TMS320F28374D

Hi Team,

How two understand these two comments in F2837xD_Gpio.c:

Thanks & Regards

Yale Li

  • Hello Yale,

    All GPIO pins are set up as input by default according to the comment, most likely for safety in case a user does not configure the pin and tries to supply a signal to it. According to this comment, that's how the GPIO is initialized.

    Best regards,

    Omer Amir

  • Hi Omer,

    Thanks for your reply.

    It seems conflicted. The comment above seems meaning "enable pull-ups". But the comment below said "avoid enabling pull-ups". It makes me confuse. How to understand it?

    Thanks & Regards

    Yale Li

  • Hello Yale,

    How I understand it is that the first comment says that all GPIO pins are by default set to input with pull-ups enabled. The second comment seems to be referring to the fact that there's a way to avoid doing this for all pins, or a 'hack', which is for when the user maybe does not want pull-ups enabled by default. Looking at the code in the file, it seems you can change the default to something else within that for-loop. I have not tested it before, but that's what it appears to be.

    Best regards,

    Omer Amir