问题:LOG显示I2C出错,查看I2C口和地址都是对的,怀疑是供电2.8有问题,量下来没有,之前项目是OK的,区别换了incell屏,incell的屏里面的TP是不需要外部2.8V的,跟屏共用。所以TP里面的电是断开的,之前能用是因为TP和AF共用2.8V,AF的电让TP给上了。 MTK正常流程其实也会给AF单独供电,所以怀疑是单独供电的代码出现问题,LOG看下来是regulator_set()下的
if ((sensor_idx == IMGSENSOR_SENSOR_IDX_MAIN && pin > IMGSENSOR_HW_PIN_AFVDD) ||
pin > IMGSENSOR_HW_PIN_DOVDD ||
pin < IMGSENSOR_HW_PIN_AVDD ||
pin_state < IMGSENSOR_HW_PIN_STATE_LEVEL_0 ||
pin_state > IMGSENSOR_HW_PIN_STATE_LEVEL_2800)
return IMGSENSOR_RETURN_ERROR;
枚举
enum IMGSENSOR_HW_PIN {
IMGSENSOR_HW_PIN_NONE = 0,
IMGSENSOR_HW_PIN_PDN,
IMGSENSOR_HW_PIN_RST,
IMGSENSOR_HW_PIN_AVDD,
IMGSENSOR_HW_PIN_DVDD,
IMGSENSOR_HW_PIN_DOVDD,
IMGSENSOR_HW_PIN_AFVDD,
看上面代码一目了然