Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

TLC5940 GSCLK is fast enough. Why does the cascaded board miss image updates?

A board expands to more than a dozen TLC5940s. Each chip still drives the correct brightness by itself, but the complete image starts missing updates. Raising the grayscale clock increases the LED repetition rate and shortens the time available to load the next image. The TLC5940 has two clocks and two boundaries. GSCLK advances the current grayscale period, SCLK shifts the next codes, BLANK resets grayscale counting, and XLAT makes the new codes active. Plot them on one timing diagram before changing oscillator frequency.

Calculate the actual grayscale period

TI specifies 4,096 GSCLK pulses for a full grayscale period, with BLANK resetting between periods. At 4.096 MHz, those pulses take 1 ms. If hardware inserts another 2 µs of blank time each period, the start-to-start span is 1.002 ms and the repetition rate is about 998.0 Hz. If the extra gap grows while the controller is busy, both repetition rate and the share of time LEDs can conduct can change. With a fixed brightness code, verify each channel's grayscale count and the uniformity of complete periods.

A 1 ms processor interrupt alone does not count pulses. Use hardware timer output and expose BLANK as a recognizable boundary. A capture of hundreds of periods distinguishes a consistent missing clock, an occasional extra clock, and an extended interperiod gap. Each has a different cause. Oscillator error of a few dozen ppm moves a millisecond period by tens of nanoseconds. Missing one GSCLK costs about 244 ns and changes the grayscale count, which the same capture can show.

Eight more chips change the SCLK budget

Each device has 16 channels with 12 bits per code, or 192 bits. Eight devices need 1,536 bits, taking at least 384 µs at 4 MHz SCLK. Sixteen need 3,072 bits and at least 768 µs. Both fit in the example's 1 ms cycle, but the latter leaves about 232 µs for SPI gaps, DMA launch and completion, interrupt delays and guard time before XLAT. At 8.192 MHz GSCLK the pulse train takes only 500 µs, so sixteen devices cannot receive new data every grayscale cycle at that SCLK. Keep an image for multiple grayscale cycles or raise SCLK within the chain's timing limits. Set display repetition and image update requirements separately before choosing clock frequencies.

Check timing at the end of the chain. Each SOUT-to-input path adds device and trace delays. Differences in SCLK arrival affect the next chip's setup and hold time. Map the chip order and use distinct patterns to expose a one-bit shift. Repeating or all-on data can mask the shift. Watching only the first SIN and the controller clock shows what the controller launched.

Latch at a complete-frame boundary

Send one fully dark pattern and one with a single lit channel. Move the lit channel to the last channel of each chip to verify chain ordering. Capture the last active SCLK edge, XLAT, BLANK and GSCLK. If DMA misses the deadline, retain the previous complete image and latch at the next valid boundary. Applying partial data can make the symptom dependent on interrupt load. Check data-sheet setup and hold between SCLK and XLAT and the relative BLANK and GSCLK edges. DMA completion at the controller still needs valid timing at the last chip.

Record the chip count, bit width, both clocks, total nonclocked intervals, and longest frame transfer in the first-article record. Test the longest chain at the heaviest interrupt load. A serial peripheral or separate clock can provide one timebase if timer resources are limited. Its relationship to the latch still needs a timing constraint. The board passes when full grayscale periods and complete images continue to meet their respective boundaries under the specified load.

A new image can arrive one period late even when the grayscale cadence stays regular. Track each ready image ID through the actual XLAT edge, and count missed deadlines separately from corrupt updates. If one late period is allowed, specify the worst delay and how many consecutive late periods are acceptable. Holding a complete old frame should still meet the product cadence requirement.

References

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.