I'm going round in circles on this. I have a nice stable image but can't get the right bits onto the correct channel.
As a test I'm trying to display a grey scale gradient r=0 to 31, g=0 to 31 b=0 to 31 so my uint16_t data is:
0b000000000000000 to 0b111111111111110
My config is:
hstx_ctrl_hw->expand_tmds =
0 << HSTX_CTRL_EXPAND_TMDS_L2_ROT_LSB |
4 << HSTX_CTRL_EXPAND_TMDS_L2_NBITS_LSB |
27 << HSTX_CTRL_EXPAND_TMDS_L1_ROT_LSB |
4 << HSTX_CTRL_EXPAND_TMDS_L1_NBITS_LSB |
22 << HSTX_CTRL_EXPAND_TMDS_L0_ROT_LSB |
4 << HSTX_CTRL_EXPAND_TMDS_L0_NBITS_LSB ;
hstx_ctrl_hw->expand_shift =
2 << HSTX_CTRL_EXPAND_SHIFT_ENC_N_SHIFTS_LSB |
16 << HSTX_CTRL_EXPAND_SHIFT_ENC_SHIFT_LSB |
1 << HSTX_CTRL_EXPAND_SHIFT_RAW_N_SHIFTS_LSB |
0 << HSTX_CTRL_EXPAND_SHIFT_RAW_SHIFT_LSB;
hstx_ctrl_hw->csr = 0;
hstx_ctrl_hw->csr =
HSTX_CTRL_CSR_EXPAND_EN_BITS |
5u << HSTX_CTRL_CSR_CLKDIV_LSB |
5u << HSTX_CTRL_CSR_N_SHIFTS_LSB |
2u << HSTX_CTRL_CSR_SHIFT_LSB |
HSTX_CTRL_CSR_EN_BITS;
and the rectangles are defined with the following 16-bit hex values (RGB555 left justified)
0
842
1084
18c6
2108
294a
318c
39ce
4210
4a52
5294
5ad6
6318
6b5a
739c
7bde
8420
8c62
94a4
9ce6
a528
ad6a
b5ac
bdee
c630
ce72
d6b4
def6
e738
ef7a
f7bc
This should give me a grey scale image but what I get is: Note Blue is completely missing and there is a colour repeat every 8. It seems like I am only clocking out 8-bits across all the channels rather than 16.
I'd really appreciate some help on this one if one of the developers could look at it.
As a test I'm trying to display a grey scale gradient r=0 to 31, g=0 to 31 b=0 to 31 so my uint16_t data is:
0b000000000000000 to 0b111111111111110
My config is:
hstx_ctrl_hw->expand_tmds =
0 << HSTX_CTRL_EXPAND_TMDS_L2_ROT_LSB |
4 << HSTX_CTRL_EXPAND_TMDS_L2_NBITS_LSB |
27 << HSTX_CTRL_EXPAND_TMDS_L1_ROT_LSB |
4 << HSTX_CTRL_EXPAND_TMDS_L1_NBITS_LSB |
22 << HSTX_CTRL_EXPAND_TMDS_L0_ROT_LSB |
4 << HSTX_CTRL_EXPAND_TMDS_L0_NBITS_LSB ;
hstx_ctrl_hw->expand_shift =
2 << HSTX_CTRL_EXPAND_SHIFT_ENC_N_SHIFTS_LSB |
16 << HSTX_CTRL_EXPAND_SHIFT_ENC_SHIFT_LSB |
1 << HSTX_CTRL_EXPAND_SHIFT_RAW_N_SHIFTS_LSB |
0 << HSTX_CTRL_EXPAND_SHIFT_RAW_SHIFT_LSB;
hstx_ctrl_hw->csr = 0;
hstx_ctrl_hw->csr =
HSTX_CTRL_CSR_EXPAND_EN_BITS |
5u << HSTX_CTRL_CSR_CLKDIV_LSB |
5u << HSTX_CTRL_CSR_N_SHIFTS_LSB |
2u << HSTX_CTRL_CSR_SHIFT_LSB |
HSTX_CTRL_CSR_EN_BITS;
and the rectangles are defined with the following 16-bit hex values (RGB555 left justified)
0
842
1084
18c6
2108
294a
318c
39ce
4210
4a52
5294
5ad6
6318
6b5a
739c
7bde
8420
8c62
94a4
9ce6
a528
ad6a
b5ac
bdee
c630
ce72
d6b4
def6
e738
ef7a
f7bc
This should give me a grey scale image but what I get is: Note Blue is completely missing and there is a colour repeat every 8. It seems like I am only clocking out 8-bits across all the channels rather than 16.
I'd really appreciate some help on this one if one of the developers could look at it.
Statistics: Posted by matherp — Sun Aug 18, 2024 9:13 pm