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.

TLC5927 - Special Mode using BeagleBone Black

Other Parts Discussed in Thread: TLC5927

Hello,

I'm having some problems to enter in the Special Mode of TLC5927.


Now i'm using SPI communication to send data, which works correct, but I can't enter in Special mode, because i can't synchronize the clock with my OE and LE.

I already tried to get the CLK signal with other GPIO and generate a interrupt on my program to finally toogle OE and LE, but it's looks like the GPIOs are too slow.


Do you can help me with this problem? I'm using C++

  • Hi Caio,

     

    It seems you undersatnd the method for entering special mode, and the question is about how to get the AM335x to correctly generate the required signals.  Is this correct?

    Have you tried slowing down the CLK signal to provide more time for the GPIO to change?

     
    Regards,

    Adam

  • Yes i understand the method, I read the page 16 of the datasheet and saw some posts:

    http://e2e.ti.com/support/power_management/led_driver/f/192/t/234866.aspx

    I tried to use a frequency of 3KHz on my transfer, but my GPIO couldn't get the signal again.

    Probabilly the GPIOs doesn't have a good sampling for that, there is not a way to generate a interrupt by the SPI Clock?

    For now i'm using the "poll()" function to block this thread until i have a change of value on my GPIO.

    Regards,

    Caio Vinicius.

  • Hi Caio,

     

    Since this is more of a AM335x programing question, I think it would best be answered by our Sitara Team.  I have found the post you made in the Sitara processors forum today and will add a link to this post for background.  

    If you have any other question about the TLC5927 operation let me know and I would be happy to assist.

     

    Best Regards,

    Adam Hoover

  • Hello,

    I found a way to enter in Special Mode.

    But now i'm not able to write and turn on the LEDs on this mode, am I not?

  • Hi Caio,

     

    I'm glad to hear you have been able to successfully enter special mode.  The capabilities in special mode are discussed on pages 16-17 of the TLC5927 datasheet.  See sections:

    Special Mode Phase

    Reading Error Status Code in Special Mode

    Writing Configuration Code in Special Mode

     

    To Summarize, in special mode, if OE is high, you will be writing to the configuration code instead of the output latch.  If OE is low, the device will enter error detect mode and serial data cannot be shifted in via SDI.   During error detect mode, the LEDs will turn on, but you will not be able to program which are on and which are off.

     

    Regards,

    Adam Hoover

  • Hello Adam,

    Thanks for your help, now i'm trying to read a Error Code, but i'm having some problems.

    To Read a Error Status Code I need:

    1 - Enter in Special Mode;

    2 - Write the Configuration Code (if i'm not using the default 0xFFFF)

    3 - Do the Reading Error Status Code:

       3a - Set OE Low;   

       3b - Enable CLK;

       3c - Wait a least 3 cycles of CLK to sample the OE Low;

       3d - Disable CLK;

       3e - Wait at least 2 us with OE Low;

       3f - Set OE High;

    4 - Switch to Normal Mode;

    5 - Read the SDO;

    I already tried to read SDO before switch to Normal mode.

    I'm just receiving 0x0000 on SDO in all of my TLC5927 (I'm using 8 in cascate).

    Can you confirm to me my procedure?

    I know that I'm entering in Special mode, because I can change the brightness of my LEDs using the writing configuration code.

    Best Regards,

    Caio Vinicius.

  • Hi Caio,

     

    You will need to read the error code before switching back to normal mode.  Otherwise new data will be shifted in after OE is brought back high.  Also, as mentioned in the datasheet, "the occurrence of the third or later 0 saves the detected error status codes into the shift register".  This means a 0 must be clocked in AFTER the 2us detect period.  Try the following procedure:

     

    1 - Enter in Special Mode;

    2 - Write the Configuration Code (if not using the default 0xFFFF)

    3 - Do the Reading Error Status Code:

       3a - Set OE Low;  

       3b - Wait >2 us with OE Low;

       3c - Wait a least 3 cycles of CLK to sample the OE Low;  

       3d - Set OE High;

       3e - Read the SDO;  // (SDI can be used to latch new or different configuration code at the same time)

    4 - Switch to Normal Mode;

     

    Regards,

    Adam Hoover

  • Hello Adam,

    I used your procedure, but unfortunately I'm receiving only 0x0000.

    I'm thinking that am not enter in detection error mode, because when I set my OE to low my LEDs doesn't light on.

    I'm setting OE low, waiting 5us before sending CLK, after send the CLK I wait more 5 us and set my OE high again.

    I saw that i wasn't getting the lights on when i debugged.

    Do you know what could be?

    Best Regards,

    Caio Vinicius.

  • Hello Adam,

    I found a way to do my test work.

    I use this procedure:

    1 - Transfer 0xFFFF to all TLC5927 and Latch using LE;

    2 - Switch to Special Mode;

    3 - Write the Configuration Code;

    4 - Do the Reading Error Status Code:

       4a - Set OE low;

       4b - Delay of 4us;

       4c - Clock 2 times;

       4d - Delay of 10us;

       4e - Clock only one time;

       4f - Delay of 1us;

       4g - Set OE High;

       4h - Delay of 1us;

    5 - Read the SDO;

    6 - Switch to Normal Mode;

    But I have just one problem, after the power-up the first Read comes only 0x0000, but the next comes normal.

    Thank you so much for all your help Adam!

    Best Regards,

    Caio Vinicius.