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.

Launchpad TMS570 User Switch 1 and User LED B

Other Parts Discussed in Thread: TMS570LS1224, HALCOGEN

Hi,

in the TMS570 launchpad board using TMS570LS1224 , how do you configure the LED and Switch to work simultaneously.

When I try to switch pin 55 to a different function , I get a conflict in halcogen.

Regards,

Surendrakumar

  • Surendrakumar,


    On the Launchpad,
    the Green LED 2 is connected to GIOB1
    the Green LED 3 is connected to GIOB2

    User switch S3 is connected to MIBSPI3NCS_0/AD2EVT/GIOB_2/EQEP1I/9.4D
    User switch S4 is connected to N2HET1_15/MIBSPI1NCS_4/ECAP1/9.4C

    As you can see, GIOB2 is multiplexed with other function and used for both LED3 and S3

    So you can't use the switch and LED at the same time.

    2 LEDS and 1 switch or 1 LED and 2 switches are possible.


    Now what I've also found in Halcogen is a problem to change on pin 55 the default function to GIOB2.

    I will contact the Halcogen team to check with them.

  • Jean-Marc Mifsud,

    Thanks for the reply. Actually I too was under the same impression. But on pondering the problem further , I thought why not try with the alternate functions.So I ended up looking inside the MiBSPI for some clue as the pin was MIBSPI3NCS_0. In the datasheet it is mentioned clearly that all the spi pins can be used as gpio pins provided the SPI functionality is disabled. Also halCoGen spi header file (reg_spi.h) has pointers to the SPI gpio registers.  With that I was able to configure the pins as gpio pin and then configured as input and started using like a normal GPIO.

    Now both the LED and SWITCH  work simultaneously.

    Thanks for the support.

    Regards,

    Surendrakumar