Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 19 Feb 2005 11:28 PM by  hansr@logicpd.com
Regarding LEDs in SDK LH7A400
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages
snair
New Member
New Member
Posts:


--
18 Feb 2005 12:33 PM
    Hi,

    I was trying to Turn ON the GPIO and Status2 LEDs by using the following code in C file (This code is used as a part of the intialization code)


    cpld_enable_led(LED_GPIO, 1);
    cpld_enable_led(LED_STATUS1, 0);
    cpld_enable_led(LED_STATUS2, 1);


    But when I execute it, after loading the whole program in the flash, all the 3 LEDs gets turned ON. I tried using the same code with the LEDs in state 0 (OFF), but even then it gets turned ON. Of course, when I comment off the instructions, none of the LEDs turn ON.

    I also single stepped through the assembley code in flash, just to make sure if the proper state is being addressed in the code, and it does seem to.

    At this point, I am not sure why I am not able to control the states of the LEDs.

    Any suggestions how to get past this issue?

    Thanks,
    Sajiv
    hansr@logicpd.com
    New Member
    New Member
    Posts:


    --
    19 Feb 2005 11:28 PM
    Sajiv,

    It sounds like your code is writing to the correct register, but is not setting a '1' (led will turn off) in the correct bits. It seems like bits 0,1 and 2 are being set to '0' (led will turn on).

    The registers is readable, so please verify. Also, ensure you are using an 8 or 16 bit access.

    Also, we are about to release a updated CPLD code version that will incorporate CPLD- internal pull-ups on the GPIO and status lines. Currently, those lines are open-drain, but are not pulled up which may also cause this issue. I would guess, however, that it is a sw issue since LogicLoader and our other SW BSPs can control them fine.

    Thanks,
    Hans
    You are not authorized to post a reply.