Skip to content

Commit efaeb1c

Browse files
committed
Update Himax driver.
* Fix default registers. * Set default registers on reset/boot.
1 parent b86aaa7 commit efaeb1c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

libraries/Himax_HM01B0/himax.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static regval_list_t himax_default_regs[] = {
157157
{0x3010, 0x01}, // 324 x 244 pixel
158158
{0x0383, 0x01},
159159
{0x0387, 0x01},
160-
{0x0390, 0x03},
160+
{0x0390, 0x00},
161161
{0x3011, 0x70},
162162
{0x3059, 0x02},
163163
{0x3060, 0x00},
@@ -207,8 +207,11 @@ uint8_t HIMAX_Open(void)
207207

208208
//printf("Model: %x:%x\n", HIMAX_RegRead(MODEL_ID_H), HIMAX_RegRead(MODEL_ID_L));
209209

210-
if (HIMAX_Reset()!=0) return -1;
211-
//HIMAX_Boot();
210+
if (HIMAX_Reset()!=0) {
211+
return -1;
212+
}
213+
214+
HIMAX_Boot();
212215
//For debugging camera Configuration
213216
//HIMAX_PrintReg();
214217
HAL_Delay(200);
@@ -284,13 +287,12 @@ static uint8_t HIMAX_Boot()
284287
uint32_t i;
285288

286289
for(i = 0; i < (sizeof(himax_default_regs) / sizeof(regval_list_t)); i++) {
287-
//printf("%d\n", i);
288290
HIMAX_RegWrite(himax_default_regs[i].reg_num, himax_default_regs[i].value);
289-
//delay(1);
290291
}
291292

292293
HIMAX_RegWrite(PCLK_POLARITY, (0x20 | PCLK_FALLING_EDGE));
293294

295+
HIMAX_RegWrite(MODE_SELECT, HIMAX_Standby);
294296
return 0;
295297
}
296298

@@ -354,4 +356,4 @@ static uint8_t HIMAX_PrintReg()
354356

355357
/**
356358
* @}
357-
*/
359+
*/

0 commit comments

Comments
 (0)