SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
Most of the register contents must be resynchronized against a DSI internal clock (tx_hs_byte_clk). This means there is a certain time to pass data from one clock domain to the other. If two writes in the same register are too close, the register itself is updated but the synchronization may fail.
The formula to calculate the number of system clock periods between two writes is:.
nb_cycle(dsi_p_clk) = 6*(fdsi_p_clk/ftx_byte_hs_clk + 1)
The application must respect a period of TX ns between two write accesses to the same register (there is no issue writing different registers back-to-back).
Table 12-362 shows an example of required time between two write accesses.
fdsi_p_clk | ftx_byte_hs_clk | TX minimum time between 2 writes accesses |
---|---|---|
200 MHz | 106 MHz | ~ 90 ns |
160 MHz | 10 MHz | ~ 650 ns |
200 MHz | 10 MHz | ~ 650 ns |
Another place where asynchronous behaviour may interfere with programming in the CB is the direct command status register DIRECT_CMD_STS. Some of the bits of this register are set when a pulse (that lasts one clock period) coming from tx_hs_byte_clk domain is observed (after resynchronization on dsi_p_clk) and is reset when the clear bit is written. In use case where tx_byte_hs_clk is slow (10 MHz range), the bit can be read and a clear attempted before the end of the source pulse. This can result in the re-assertion of the bit immediately after it is cleared. For that reason, it is recommended to wait for a while between reading the bits of the DIRECT_CMD_STS register and clearing them.
Application Issues
Some register fields cannot take all the possible values but are restricted to a certain number of combinations (mode control). The DSI controller does not check that all the fields match a valid setup so it is the responsibility of the system integrator and the application to check that the written values are amongst the permitted combinations. Amongst the register fields that fall in to this category are most of the mode settings (stop mode, recovery mode, direct command type, image sizes, etc.)
Programming Coherency
The application level must ensure that the register configurations are valid for the system to operate correctly. There are several possible combinations are possible in the CB registers however should be avoided. A few examples: