1˵
    1COMP1PA6INP PA1INM PA0Ӱ
2ʹû
      KEIL MDK-ARM V5.30.0.0
    Ӳ      N32G031C8L7-STB V1.0
3ʹ˵
    ϵͳã
        1ʱԴ
                    HSE=8M,PLL=48M,AHB=48M,APB1=48M,APB2=48M,COMP CLK=48M
        2˿ã
                    PA1ѡΪģ⹦COMP INP
                    PA0ѡΪģ⹦COMP INM
                    PA6ѡΪģ⹦COMP OUT
                    PA2ѡΪIO
                    PA3ѡΪIO
        3COMP
                    COMP1PA1PA0PA6
    ʹ÷
        1򿪵ģʽPA2ӵPA1PA3ӵPA0ʾ߼ǹ۲PA6
        2PA2ƽPA3ʱPA6ߵƽ෴ʱ͵ƽ
4ע
    


1. Function description
     1. The output PA6 of COMP1 is affected by the input INP PA1 and INM PA0

2. Use environment
     Software development environment: KEIL MDK-ARM V5.30.0.0
     Hardware environment: Developed based on the development board N32G031C8L7-STB V1.0

3. Instructions for use
     System Configuration;
         1. Clock source:
                     HSE=8M, PLL=48M, AHB=48M, APB1=48M, APB2=48M, COMP CLK=48M
         2. Port configuration:
                     PA1 is selected as the analog function, COMP INP
                     PA0 is selected as the analog function, COMP INM
                     PA6 is selected as the analog function, COMP OUT
                     PA2 is selected as IO output
                     PA3 is selected as IO output
         3. COMP:
                     COMP1 input PA1, PA0, output PA6
     Instructions:
         1. After compiling, turn on the debug mode, connect PA2 to PA1, and PA3 to PA0, use an oscilloscope or logic analyzer to observe the output waveform of PA6
         2. When the software output PA2 level is greater than PA3, PA6 output high level, on the contrary, output low level

4. Matters needing attention
   None