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.

TMS320f28027f analog pin configuration



Hi,

 My requirement need the analog pins to be configured as digital enabling me to connect LED's.

I would like to configure the analog pin AA6 as digital.

I have configured both the aiomux1 as well as the aiodir registers for my requirement.

However, the values are not getting updated in the watch window and the voltage (approx 1.4v) is appearing on the pins when checked with a multimeter.

My code to configure is as follows

EAALLOW;

GpioCtrlRegs.AIOMUX1.all= 0x00000000;

GpioCtrlRegs.AIODIR.all= 0x00000040;

EDIS;

i also need some clarification with respect to the pins being labelled as AA1 AB1 and so on. what is the difference between AA1 and AB1?

kindly advise.

  • Hi,

    Configuration seems to be alright.
    What is the value reflected in AIODAT for the corresponding AIO6 bit?
    Did you try writing some value into AIODAT and check the value is reflected at the pin?
    Can you put a break point in your code and check the values are actually written to AIOMUX/DIR regs?

    -Bharathi.
  • Also, I notice "EAALLOW; " it would have resulted in compile error. Should be "EALLOW;"
  • Hi,

    Thanks for your response.
    aiodat seems to be all zeros.
    i haven't written any values into aiodat so far but how will it help me if i am not able to configure the pin using aiomux1 whose default value of all A's doesn't seem to change.
    the statements after these statements seem to be working fine as i have configured an led to glow from a gpio pin after the setting of the registers and they seem to glow fine
    and it's my error regarding the EAALLOW, it was a typo here. i used eallow in the actual code

    Thanks
  • Hi,

    Since you said that the write to the AIOMUX1 register is not reflecting the value in the watch window -
    To make sure write has actually occurred to the AIOMUX1 reg - i was asking you to check the break point in the code and check the value in the AIOMUX1 reg. You can also read back in the code to make sure value is written and read back properly, just to rule out any watch window refresh related issue.
    Otherwise the configuration seems fine to me.

    -Bharathi.