本帖最后由 yangjun4618 于 2021-12-12 17:43 编辑
void COMP_SetRefScl(uint8_t Vv2Trim, bool Vv2En, uint8_t Vv1Trim, bool Vv1En) 函数能说明下吗 COMP_Initial.InmSel = COMP1_CTRL_INMSEL_VREF_VC1;当为此设置时,Vv2Trim和Vv1Trim 这两个值如何计算 是多少电压点。。
新手 请指导下
void COMP_Configuratoin(void)
{
COMP_InitType COMP_Initial;
/*Set dac2,dac1. because dac1/PA4 is share pin line,so only PB0 puls 0/1, can find out puls*/
COMP_SetRefScl(16, true, 32, true);
/*Initial comp*/
COMP_StructInit(&COMP_Initial);
COMP_Initial.InpSel = COMP1_CTRL_INPSEL_PB10;
COMP_Initial.InmSel = COMP1_CTRL_INMSEL_PA5;
COMP_Initial.SampWindow = 50;
COMP_Initial.Thresh = 30;
COMP_Init(COMP1, &COMP_Initial);
COMP_Enable(COMP1, ENABLE);
}
能对COMP_SetRefScl这个函数说明下吗
|