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.

TPS61311 in flash mode

Other Parts Discussed in Thread: TPS61311

Hi,
I work with TPS61311 and have some problems and questions with programming this module in flash mode.
(working with LED2, STRB1 is always = 0)

1. Problem: Video mode is activated after the flash.
a) STRB0 = 0
b) Module reset

FlashRegWrite(0x00, (1 << 7));
Sleep(100);

c) Module is setup to be in Flash Mode

FlashRegWrite(0x01, 0x10 | (2 << 6));

d) STRB0 = 1 fires flash for ~500ms
e) after 500ms led does not turn off, but for 13s is still on.
It looks like video mode is activated? Why is so?


2. Problem: Rising edge trigger does not holds led on.
a) STRB0 = 0, STRB1 = 0
b) Module reset

FlashRegWrite(0x00, (1 << 7));
Sleep(100);

c) Module is setup to be in Flash Mode

FlashRegWrite(0x01, 0x10 | (2 << 6));

d) Set trigger on rising edge

FlashRegWrite(0x03, 0xC1 | (1 << 2));

e) STRB0 = 1 and immediately STRB0 = 0
f) led turns off immediately after STRB0=0 instead of being on for ~500ms.
How to correctly enable rising edge trigger?

3. Triggering by I2C command

According to spec:
The flash strobe is started either by a rising edge on the synchronization source (STRB0 = 1, STRB1 = 0) or by a
positive transition on the START-FLASH/TIMER (SFT) bit (STRB0 = 1, STRB1 = 0).

What is the difference in triggering flash by STRB0 and by SFT? From the spec I understand that in both cases STRB0=1 which automatically triggers flash, REGARDLESS of SFT signal.

  • Hi Piotr,

    thanks for posting your questions and detailed descriptions.

    I will summarize some explanations to meet your questions. I will give you feedback once i gathered the answers.

    Regards,

    Florian

  • Piotr,

    I do  have some additional questions:

    can you please add the information what is exactly written to the TPS61311 Registers, not just the sub-functions of your controller?

    What is the status of the register at the very start (i. e. before point b) of your software flow in any case?

    What is the transmission frequency of your controller? What kind of I2C Controller do you use for the communication?

    Thanks,

    Florian

  • can you please add the information what is exactly written to the TPS61311 Registers, not just the sub-functions of your controller?

    I'm not sure if I understand correctly. By:

    FlashRegWrite(0x00, (1 << 7));

    you should understand that I write value (1<<7) which is equal to 0x80 to register 0x00. If there are no other transactions, then registers are in default states.

    What is the status of the register at the very start (i. e. before point b) of your software flow in any case?

    Does it matter if I force the TPS to reset which should restore all registers to default?

    What is the transmission frequency of your controller? What kind of I2C Controller do you use for the communication?

    400 Kbps. It's a devasys board: http://www.devasys.com/usbi2cio.htm. We use it for many development i2c devices and always works well. 

  • Piotr,

    thanks for your explanations how your software works. Basically it makes sense just to tell what bytes are sent to the device. This makes it easier to support you in the best way without discussing too much about your code - i. e. when having no idea what language you are using, or what exactly is behind your sub-routins.

    you should understand that I write value (1<<7) which is equal to 0x80 to register 0x00. If there are no other transactions, then registers are in default states.

    When there is no other transaction present, you are definitely correct that the registers are in default values after that. Can I assume that you verified that the device (not a source code in a controller) sees only this commands?

    1. Problem: Video mode is activated after the flash.

    If you do want to switch off the LED's completely, just set the DC-Light register to '0 mA'. This is implemented to enable higher flexibility.

    2. Problem: Rising edge trigger does not holds led on.

    Please make sure that the STRB=1-signal is present during the duration of the programmed pulse.

    3. Triggering by I2C command

    What is the difference in triggering flash by STRB0 and by SFT? From the spec I understand that in both cases STRB0=1 which automatically triggers flash, REGARDLESS of SFT signal.

    The device has the feature to start a flash via I2C command (SFT-Bit) as well. If you do not want to use the STRB Lines for triggering, you can use the I2C Command.

    Can you please explain a bit what kind of application your are targeting?

    Regards,

    Florian

  • Next time I will be more clear when giving you register values ;)

    Thank you for responses but unfortunatelly they do not answer my questions.... 

    1. Setting the DC light to 0 is the workaround I used but it's still not clear for me, why watchdog is activated, when it shouldn't. According to spec:

    MODE_CTRL[1:0] = 10

    The STRB0, STRB1 inputs are enabled. The flash pulse can be triggered by these
    synchronization signals, or by a software command (START_FLASH/TIMER (SFT)
    bit). The LEDs are enabled/disabled according to the STRB0, STRB1 input. The
    flash safety timer is activated, and the video light watchdog timer is disabled.

    2. I don't understand you. According to Figure 40. in the spec:

    STRB1 should be 0 and it is. STRB0 should be triggered to high and then it can goes down. Which signal do you mean by " STRB=1"? If STRB0 then you are talking about level triggering instead of edge triggering which is my case.

    3. Yes, you are right. I understand what is software triggering... But it was not a question. From the spec I understand that in both cases STRB0=1 which automatically triggers flash, REGARDLESS of SFT signal. In other words, what should be states of STRBx signals and SFT bit to trigger flash in these both cases? I would like to see difference.

  • Piotr,

    as you already started an E-Mail conversation in parallel, lets avoid duplicate communication.

    I will keep the answers in the E-Mail.

    Regards,

    Florian