I've tried to understand the SetIntfParams and QueryIntfParams programmation of DATA_MODE. If I select RGB888 format, the definition is 0x03.
There is a intermediate variable in code "pdfMode" that is linked to this DATA_MODE. there is indeed a macro that makes (RGB888 format) & 0xf0 >> 4 as pdfMode.
So can explain that the DATA MODE is always set to 0.
As There is no special explaination for 'mode0,mode1,mode2' I've just try to set the parameter from RGB888 to RGB888 | 0x20 to set DATA MODE to 2 which I suppose is 24 bits format.
However, I'm somewhere wrong because DATA MODE is not correctly programmed and whole 0x4 I2C mipi register is wrong : I'm trying to program 0x0243 (0x200 | 0x43) but read value is 0x8004 after SetIntf programmation.
Thank you for your help,
I believe the DATA_MODE is in fact just a part of DATA_FORMAT definition. So for some format definitions, it is allowed to change it but for RGB888 ("3"), it is not possible and only possibility is DATA_MODE = 0 and automatically output is 24 bits.as soon.
So for RGB888 mode1, mode2 for DATA_MODE have no meaning whereas for RGB666 they have.
Would it be possible to confirm this ?
Please refer section 1.6 CX3 MIPI CSI-2 Stream Formats of CX3_TRM.pdf for the supported streaming formats and output modes.
It is mentioned that there is only one mode for RGB888. Hence, only one mode is supported. We can see that RGB666 supports two modes (Mode 0 and Mode 1). Hence, it supports two modes.