2023-05-24 01:51 AM
void Comp1Init(void)
{
Comp1GpioInit();
RCC -> APB2ENR |= 1; //20230506
/////////////////////////////////////////////////////////
COMP1 -> CSR |= 3 << 19;//TIM3 OC3 Banking of CSA p739
///////////////////////////////////////////////////////////
COMP1 -> CSR |= 0 << 8;//PA1 -> COMP1+//
///////////////////////////////////////////20230512
COMP1 -> CSR |= 4 << 4; //DAC3CH1-> COMP1-
COMP1 -> CSR |= 3 << 2;//high speed
COMP1 -> CSR |=1; //20230506 EN
}