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.

RTOS/TMDXICE110: Pinmux file

Part Number: TMDXICE110
Other Parts Discussed in Thread: AMIC110

Tool/software: TI-RTOS

Hello.

I want to manage LED, that connect to GPIO. I use GPIO_write(Board_LED1, GPIO_PIN_VAL_HIGH); How can I find name "Board_LED1" or how I able to create it name. In fact, I need gpio pin config file. Is SDK have this file for ICEAMIC110 or I should create this file manually.

  • The RTOS team have been notified. They will respond here.
  • Maybe I did not correctly ask the question. I downloaded the GPIO_LedBlink_iceAMIC110_armTestProject project. Project compiled and loaded to the target. When I start project, I have in a console message: GPIO Led Blink Application, All tests have passed.
    But not one LED on the board does not light up. I tried to deal with the function GPIO_write(). And I could not understand whence the system take the address of the register of port and number of a pin which it is necessary to set in logic "1".
  • Hi Kiselev,

    The AMIC110 pinmux file is located here -  PDK packages\ti\starterware\tools\pinmux_config\am335x\iceamic11x_config, and you can open it to find out the GPIO pins with the online pinmux tool .

    You can also find the LED_1 pin (K15, GPIO0_17) from AMIC110 ICE schematic -

    Unfortunately the GPI_LedBLink example based on AM335x ICE seems not be full updated. If you update the

    #define GPIO_USER1_LED_PIN_NUM    (0x11)

    #define GPIO_USER1_LED_PORT_NUM   (0x00)

    /* GPIO Driver board specific pin configuration structure */

    GPIO_PinConfig gpioPinConfigs[] = {

       /* Input pin with interrupt enabled : User LED */

       GPIO_DEVICE_CONFIG((GPIO_USER0_LED_PORT_NUM + 1), GPIO_USER0_LED_PIN_NUM) |

       GPIO_CFG_IN_INT_RISING | GPIO_CFG_INPUT,

       /* Output pin : User LED */

       GPIO_DEVICE_CONFIG((GPIO_USER1_LED_PORT_NUM + 1), GPIO_USER1_LED_PIN_NUM) |

       GPIO_CFG_OUTPUT

    };

    And call the routing in the while(1) loop of gpio_test below, you should be able to see LED_1 blinking - 

    GPIO_write((USER_LED1), GPIO_PIN_VAL_HIGH);

    AppDelay(DELAY_VALUE);
    GPIO_write((USER_LED1), GPIO_PIN_VAL_LOW);

    Regards,

    Garrett

  • Hello, Garrett.

    Thank you for answer. I was able to find pinmux config and looked them. LED_1_pin is really on K15,GPIO0_17.

    After I changed code like You said, my board still not blink LED1.

    After I tried change GPIO DEVICE CONFIG((GPIO_USER1_LED_PORT_NUM + 1) to GPIO DEVICE CONFIG((GPIO_USER1_LED_PORT_NUM), and my board is able to blink LED1.

    Now I want to manage LED2 and etc. How can I do my configuration to function GPIO_init(). Should I write it to gpioPinConfigs[], or it doing another way? If it should write to gpioPinConfigs[], then how will it be correct?

  • Hi Kiselev,

    You really should have GPIO DEVICE CONFIG((GPIO_USER1_LED_PORT_NUM + 1) instead of GPIO DEVICE CONFIG((GPIO_USER1_LED_PORT_NUM). Make sure you have GPIO_USER1_LED_PORT_NUM updated from default 1 to 0.

    To add more LEDs,e .g. LED2 (J18, GPIO0_16), you can update the LED pins in GPIO_board.h:

    typedef enum GPIO_LED {
    USER_LED0 = 0,
    USER_LED1,

    USER_LED2
    }GPIO_LED;

    then add USER2 the GPIO_iceAMIC110_board.c

    #define GPIO_USER2_LED_PIN_NUM (0x10)
    #define GPIO_USER2_LED_PORT_NUM (0x00)


    /* GPIO Driver board specific pin configuration structure */
    GPIO_PinConfig gpioPinConfigs[] = {
    /* Input pin with interrupt enabled : User LED */
    GPIO_DEVICE_CONFIG((GPIO_USER0_LED_PORT_NUM + 1), GPIO_USER0_LED_PIN_NUM) |
    GPIO_CFG_IN_INT_RISING | GPIO_CFG_INPUT,

    /* Output pin : User LED */
    GPIO_DEVICE_CONFIG((GPIO_USER1_LED_PORT_NUM + 1), GPIO_USER1_LED_PIN_NUM) |
    GPIO_CFG_OUTPUT,

    GPIO_DEVICE_CONFIG((GPIO_USER2_LED_PORT_NUM + 1), GPIO_USER2_LED_PIN_NUM) |
    GPIO_CFG_OUTPUT

    };

    /* GPIO Driver call back functions */
    GPIO_CallbackFxn gpioCallbackFunctions[] = {
    NULL,
    NULL,

    NULL
    };

    then toggle the pin:

    GPIO_write((USER_LED2), GPIO_PIN_VAL_HIGH);
    AppDelay(DELAY_VALUE);
    GPIO_write((USER_LED2), GPIO_PIN_VAL_LOW);

    FYI - I have submitted an internal ticket to fix the GPIO_LedBlink example on AMIC110 ICE.

    Regards,

    Garrett

  • Hi Garrett.

    Thank you. I was able to add more GPIO and they working. 

    I foresee the next question that I will have later. When I finish with the debug board ICEAMIC110, I will have the task of creating my own scheme, in which the pinout of AMIC110 will be different from the example of TI. If I understand correctly, I will need to integrate the files from the PINMUX program with my own pinout scheme into my project. Actually, the question is - how to do it correctly? Where is the description of this procedure I can find?

  • Kiselev,

    You are welcome. You can find the Pinmux Getting started guide here - processors.wiki.ti.com/.../TI_PinMux_Tool_v4

    Regards,
    Garrett