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.

Little improvement for i2c_led example in SYSBIOSSDK-IND-AM335X

Other Parts Discussed in Thread: AM3359, SYSBIOS

Hi

I tested the i2c_led example from SYSBIOSSDK-IND-AM335X v01.00.00.04  on the ICE AM3359 and I realized that the RGB-LED D4 only light in red and green color, not in blue. So I looked in the Source-Code and noticed following lines:

set_generic_gpio_led(0,12 ,0);
...
set_generic_gpio_led(0,12 ,1);

But in the shematic the Blue LED in D4 is connected with GPIO_29. I would propose to check if the Board is an IDK or an ICE to determinate which Pin should be used. I did this tiny change and attached the main.c. I have to admit that I'm not 100% sure that on the IDK the pin 12 is the right one...

Changes:

/*
 *  ======== taskFxn ========
 */
Void taskFxn(UArg a0, UArg a1)
{
    unsigned int RunLed = 0;
    unsigned char led_val = 0xff;
    unsigned char changing_pin = 0;
    System_printf("enter taskFxn()\n");
    UARTPutString(uartInstance,"\nTI Industrial SDK Version - ");
    UARTPutString(uartInstance,IND_SDK_VERSION);

    UARTPutString(uartInstance,"\n\rSYS/BIOS LED Sample application running on ");
    if(AM335X_BOARD_TYPE_ICE  == boardType)
    {
        UARTPutString(uartInstance,"ICE \n\r");
        changing_pin = 29;
    }else if(AM335X_BOARD_TYPE_IDK  == boardType)
    {
        UARTPutString(uartInstance,"IDK \n\r");
        changing_pin = 12;
    }

    set_led(led_val);
    Task_sleep(2000);
    led_val = 0;
    set_led(led_val);
    Task_sleep(1000);

    set_generic_gpio_led(0,0 ,0);
    set_generic_gpio_led(0,1 ,0);
    set_generic_gpio_led(0,changing_pin ,0);
    set_generic_gpio_led(0,13 ,0);
    set_generic_gpio_led(0,16 ,0);
    set_generic_gpio_led(0,17 ,0);

    set_generic_gpio_led(0, 0,1);
    set_generic_gpio_led(0, 1,1);
    set_generic_gpio_led(0, changing_pin,1);
    set_generic_gpio_led(0, 13,1);
    set_generic_gpio_led(0, 16,1);
    set_generic_gpio_led(0, 17,1);

    while(1)
    {
        set_led_off(led_val);
        led_val = (led_val+1)%9;
        set_led_on(led_val);
        Task_sleep(300);

         if (RunLed > 0)
         {
            set_run_led();
            set_act0_led();
            reset_error_led();
            reset_act1_led();
         }
         else
         {
            set_error_led();
            set_act1_led();
            reset_run_led();
            reset_act0_led();
         }

        RunLed ^= 1;
    }

}:

Kind regards, Cyril

  • Cyril,

    Thank You. We really appreciate you debugging this and providing us the input. We will definitely review and incorporate the appropriate changes in our next release. it is feedback like these that help us improve our SDK.

    Regards,

    Ranjith

  • Hello Friends

    I am working on SYSbios in CCSv5 and i am using beaglebone-AM3358 as my target.

    I am trying to use Cortex-A8 GPIO pins to blink LEDs on the target.

    Which one will be the easy and possible way to do that ??

    Is that i need to use any protocols for Ex :i2c / SPI to do that ??

    I am trying some demo gpioLEDBlinking.c application  from  am335x_sysbios_ind_sdk but when i am running gpioLEDBlink.out on target im getting below error-->

    ti.sysbios.family.arm.exc.Exception: line 176: E_dataAbort: pc = 0x800043f4, lr = 0x80006de0.
    xdc.runtime.Error.raise: terminating execution

    Please share your ideas.


    Thanks

  • IA-SDK does not support BeagleBone targets... Only ICE and IDK. So if your pin-mux or other initialisation is not correct it can cause any kind of issues. You need to single step and debug the issue.

    Regards.

  • Hi guys,

    By the way, I have found thatGPIO0.12 was link to FET_nOE. I made a quick remember in my code because I planned to understand it later, but obviously I have no time. Here is the reminder:

        /*----------------FET_nOE <=> GPIO0_12------------------//
        //    INPUT    |    INPUT/OUTPUT A   |      FUNCTION    //
        //       L     |        B            |  A port = B port //
        //       H     |        Z            |   Disconnect     //
        //------------------------------------------------------*/
        set_generic_gpio_led(0,12,0);        //FET_nOE
        set_generic_gpio_led(0,12,1);        //FET_nOE

    Can you tell me more about that FET_nOE thing ?

    Thanks,
    Paul

    Info: I am using ICE board.