EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: pascaldao on November 22, 2020, 10:05:52 pm

Title: DCS READ FROM MIPI DISPLAY USING TC358870XBG
Post by: pascaldao on November 22, 2020, 10:05:52 pm
Hello,

I am attempting to perform a short DCS read in order to get the display's power mode. I am using an STM32 and I am communicating with the bridge over I2C. Here is what I am doing currently:

Write DCS read or generic read command to DCSCMD_Q (0x0504):
_txBuffer[0] = 0x05;
_txBuffer[1] = 0x04;
_txBuffer[2] = 0x14; //Generic READ, 1 param. PS: I also tried with 0x06(DCS read)
_txBuffer[3] = 0xA0; //get_power_mode (DCS read cmmd)
HAL_I2C_Master_Transmit(&hi2c1, TOS_SLAVE_ADDR, _txBuffer, 4, 10000);

Give control of the bus to the display:
//BTA (not sure if necessary)
_txBuffer[0] =  0x02;
_txBuffer[1] = 0x2C;
_txBuffer[2] = 0x01; //0001 -> BTA turn request ?
HAL_I2C_Master_Transmit(&hi2c1, TOS_SLAVE_ADDR, _txBuffer, 3, 10000);

Read DSI RX Header because this should be a short read:
//Read DSI RX Header
_txBuffer[0] =  0x01;
_txBuffer[1] = 0xBC;
HAL_I2C_Master_Transmit(&hi2c1, TOS_SLAVE_ADDR, _txBuffer, 2, 10000);
HAL_I2C_Master_Receive(&hi2c1, TOS_SLAVE_ADDR, _rxBuffer, 3, 10000);

When I do this the 3 bytes I read from 0x01BC are all 0's, yet my display is on and displaying images. What am I doing wrong? How can I read from my MIPI display and send the data to the STM32 ?
I have attached the datasheet of the TC358870XBG.
Regards,

Mawaba.
Title: Re: DCS READ FROM MIPI DISPLAY USING TC358870XBG
Post by: mikeselectricstuff on November 22, 2020, 10:50:07 pm
Have you looked at the actual data lines with a scope to see what's actually happening on the bus ?

Bear in mind that displays may not implement all of the features in the spec - for example why would a host actually need to read the power mode of the display, as it would be the host that put it in that mode in the first place!

I wouldn't  be at all surprised if some displays have on read functionality at all, as the consumer products they're designed for aren't likely to need it.



 
Title: Re: DCS READ FROM MIPI DISPLAY USING TC358870XBG
Post by: pascaldao on November 23, 2020, 03:37:05 pm
Hello @mikeselectricstuff,

Thanks for the reply. You bring up a a good point. I will search to see if the display I have has that capability. However, assuming that it did, do you think my code should work?