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.

EVMK2G: Baremetal code for toggling LED or PIN

Part Number: EVMK2G
Other Parts Discussed in Thread: 66AK2G12

Hi experts.

for my work I have to program the EVMK2G in order to execute several tasks at fixed time by means of  DSP C66x.

I downloaded pdk_k2g_1_0_16 and I installed CCS10.2.

I developed a code taking a cue from the example C:\ti_hpc\pdk_k2g_1_0_16\packages\ti\csl\example\timer_test.c and it works.

Next step is to configure the GPIOs.

May you suggest me any examples for toggling GPIOs or LEDs on EVMK2G by means of baremetal code? This could be a good starting point for my next step.

Best Regards,

Benito

  • Hi Benito,

    The PDK has example projects that you can refer to. Please follow instructions here to create the example projects. You'll find GPIO_LedBlink_evmK2G_xxx projects that should meet your needs.

    Regards,

    Jianzhong

  • Dear mr jianzhongxu,

    I succesfully tested the code you suggested me. Thank you!

    I would like to modify this code in order to toggle another GPIO than LED0_SOC and LED1_SOC. I should change the pin number "GPIO_LED0_PIN_NUM=108U" and "GPIO_LED1_PIN_NUM=11U" within  the configuration structure gpioPinConfigs.

    My aim is to measure the duration of the interrupt tasks by means of an oscilloscope. I need to select a GPIO pin on EVMK2G on which connect the oscilloscope probe. 

    Please, could you suggest me the document containing the GPIO configuration map in EVMK2G?

    For example, what is the GPIO associated to LED3_SOC? In the production schematic SPRR302 (https://www.ti.com/lit/df/sprr302/sprr302.pdf) is indicated only the GPIO associated to LED0_SOC and LED1_SOC.

    Oytherwise, is there a GPIO associated to the pin within serial expansion connector? 

    Thank you in advance.

    Best regards,

    Benito Carotenuto

     

  • Hi Benito,

    You're looking at the right documentation. Let me loop in our HW expert to further assist you.

    Regards,

    Jianzhong

  • Benito, you need to look at the 66ak2g12 datasheet to determine which GPIOs are connected to the signals on the EVM.  For example, SoC_LED1 is connected to pin E11, which is associated with GPIO1_11.  You will need to properly configure the mux mode for that pin and then configure the GPIO module to control it.  

    SoC_LED3 is connected to an IO expander, so you will have to communicate with that device in order to control that signal.

    Regards,

    james