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.

LAUNCHXL-F280049C: GPASET is not reflecting on port pin and GPADAT register

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: C2000WARE

Hi,

I'm using 280049C launch pad for my proto unit building and testing. I'm trying to find the loop times of my code using gpio pins.

I configured GPIO17 as output port using the following statements.

GpioCtrlRegs.GPAMUX2.bit.GPIO17 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO17 = 1;
GpioDataRegs.GPACLEAR.bit.GPIO17 = 1;

Then, I have following statement in mail code

GpioDataRegs.GPATOGGLE.bit.GPIO17 = 1;

Though the value in toggle register is 1, it is not reflecting on gpio pin. When I try to read GPADAT register in each loop, the value of GPIO17 is not changing.

Thanks

  • Hi Audio Design,

    Thanks for your question.

    Though the value in toggle register is 1, it is not reflecting on gpio pin

    The value should always return 0 in this register, so please ensure the offset being read is the correct register. It will simply invert the output when a 1 is written.

    When I try to read GPADAT register in each loop, the value of GPIO17 is not changing.

    Can you try the "gpio_ex2_toggle.c" in C2000Ware and see if it works

    1) with all default no modifications to code and

    2) when GPIO17 is swapped for default GPIO?

    This is to narrow down if this is a software or hardware issue.

    Regards,

    Vince

  • Hi Vince,

    Thank you for your reply.

    Yes, I understand that the GPASET/GPACLEAR/GPATOGGLE register returns 0 on read. I verified GPADAT register which should show the actual pin status.

    I tried  "gpio_ex2_toggle.c" project from C2000 ware. But it did not work. I did not really understand the syscfg file for GPIO. So I passed 17 as the input to the init function and toggle functions. But I could not see update on GPADAT register or the actual port status

    Then I tried the led blinking example 'led_ex1_blinky' where the project used GPIO31. For this project GPADAT register is getting updated with the actual status of pin 31. But here also I could not see it on port pin on launchpad (14th pin on J6, physically 74 on launchpad).

    Please let me know what could be other cases for this issue.

    Thanks,

    Hima

  • Hi Hima,

    Thanks for the follow up. If the example is not working when left unchanged, then this is likely a board level issue. Can you confirm if you are using a TI launchpad unmodified?

    Also, can you confirm you used the predefined launchpad symbol as mentioned in this thread? https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/815800/ccs-launchxl-f280049c-how-to-set-predefined-symbols-globally

    That is required for the clocks to work properly.

    Regards,

    Vince

  • Hi Vince,

    This resolve my issue. It worked fine with defining _LAUNCHXL_F280049C.

    Thanks you very much for your help.

    Regards,

    Hima