Lines Matching full:eadc
36 * by Timer-trigger EADC. To implement this interconnection, TCPC node_id
37 * will cover UTCPD, EADC, and Timer H/W characteristics of registers,
39 * NOTE: EADC and Timer interrupts needn't enable for Timer-triggered EADC.
225 } eadc; member
290 * @note UTCPD VBVOL.VBVOL = MSB 10-bit of EADC DAT.RESULT[11:0],
310 * @note UTCPD VBVOL.VBVOL = MSB 10-bit of EADC DAT.RESULT[11:0],
377 * @brief Initializes EADC Vref
400 spec = config->eadc.spec_vbus ? config->eadc.spec_vbus : config->eadc.spec_vconn; in numaker_eadc_vref_init()
466 if (config->eadc.spec_vbus == NULL) { in numaker_utcpd_vbus_measure()
996 * @brief Configures EADC sample module with trigger source, channel, etc.
1059 if (config->eadc.spec_vbus != NULL) { in numaker_utcpd_vbus_init()
1103 if (config->eadc.spec_vbus != NULL) { in numaker_utcpd_vbus_init()
1414 /* NOTE: For absence of EADC channel measurement for VCONN, we configure with all-one which in numaker_utcpd_init_startup()
1415 * is supposed to be invalid EADC channel number so that UTCPD won't get updated in numaker_utcpd_init_startup()
1418 if (config->eadc.spec_vbus != NULL) { in numaker_utcpd_init_startup()
1419 muxsel |= (config->eadc.spec_vbus->channel_id << UTCPD_MUXSEL_ADCSELVB_Pos); in numaker_utcpd_init_startup()
1423 if (config->eadc.spec_vconn != NULL) { in numaker_utcpd_init_startup()
1424 muxsel |= (config->eadc.spec_vconn->channel_id << UTCPD_MUXSEL_ADCSELVC_Pos); in numaker_utcpd_init_startup()
1446 * @brief Initializes EADC to be timer-triggered for measuring
1472 * NOTE: EADC measurement channel for VBUS can be absent with PWRSTS.VBPS as fallback in numaker_eadc_init_startup()
1474 spec = config->eadc.spec_vbus; in numaker_eadc_init_startup()
1476 rc = numaker_eadc_smplmod_init(dev, spec, config->eadc.trgsel_vbus); in numaker_eadc_init_startup()
1486 * NOTE: EADC measurement channel for VCONN can be absent for VCONN unsupported in numaker_eadc_init_startup()
1488 spec = config->eadc.spec_vconn; in numaker_eadc_init_startup()
1490 rc = numaker_eadc_smplmod_init(dev, spec, config->eadc.trgsel_vconn); in numaker_eadc_init_startup()
1500 * @brief Initializes Timer to trigger EADC for measuring VBUS/VCONN
1510 /* Configure Timer to trigger EADC periodically */ in numaker_timer_init_startup()
1511 TIMER_Open(timer_base, TIMER_PERIODIC_MODE, config->eadc.timer_trigger_rate); in numaker_timer_init_startup()
1605 if (config->eadc.spec_vbus != NULL || config->eadc.spec_vconn != NULL) { in numaker_tcpc_init_startup()
1606 /* Initialize EADC */ in numaker_tcpc_init_startup()
2259 /* Fall back to PWRSTS.VBPS if VBUS measurement by EADC is not available */ in numaker_tcpc_vbus_check_level()
2301 /* VBUS measurement is made automatic through Timer-triggered EADC. */ in numaker_tcpc_vbus_enable()
2416 /* EADC register address is duplicated for easy implementation.
2421 (BUILD_ASSERT(DT_INST_REG_ADDR_BY_NAME(inst, eadc) == \
2435 /* Notes on specifying EADC channels
2449 /* Note on EADC spec index
2482 "EADC device for VBUS error"); \
2486 "EADC channel for VBUS error");))
2493 "EADC device for VCONN error"); \
2497 "EADC channel for VCONN error");))
2529 .eadc_base = (EADC_T *)DT_INST_REG_ADDR_BY_NAME(inst, eadc), \
2540 .eadc = NUMAKER_EADC_INIT(inst), \