1˵

    òʾʹUARTദģʽUARTyUARTzUART1UART2
    ȣֱUARTyUARTzĵַΪ0x10x2UARTyUARTzַ0x33UARTzյ0x33㷭תLED1š
    һKEY1_INT_EXTI_LINE߼⵽أEXTIжϣEXTI4_15_IRQHandlerжϴ(the ControlFlag = 0)
    UARTz뾲ĬģʽھĬģʽУLEDֹͣתֱKEY1_INT_EXTI_LINE߼⵽(the ControlFlag = 1)
    EXTI4_15_IRQHandlerжϴУUARTy͵ַ0x102UARTzLEDת


2ʹû

    KEIL MDK-ARM V5.34.0.0
    Ӳ 
        N32G05xϵУ
            N32G05xRBQ7_STB V1.0
        N32G05xϵУ
            N32G05xRBL7_STB V1.0


3ʹ˵
	
    ϵͳʱ£
    - ϵͳʱ = 64MHz
    
    UARTy£
    -  = 115200 baud
    - ֳ = 9λ
    - 1ֹͣλ
    - Уƽ
    - ͷʹ  
    
    
    UART£    
    - UART1_Tx.PA2   <------->   UART2_Rx.PB5
    - UART1_Rx.PA3   <------->   UART2_Tx.PB4   
    
    KEY1_INT_EXTI_LINE.PA4    <------->   KEY1
    
    LED1    <------->   PB0

    
    Բ
    - DemoKEIL±MCU
    - λУ۲LED1Ƿ˸״̬
    - KEY۲LED1Ƿֹͣ˸
    - ٴΰKEY۲LED1Ƿָ˸


4ע


1. Function description

    This test example demonstrates how to use the UART multiprocessor mode. UARTy and UARTz can be UART1 and UART2.
    First, set the addresses of UARTy and UARTz to 0x1 and 0x2 respectively. UARTy continuously sends the character 0x33 to UARTz. UARTz receives 0x33 and flips the pins of LED1.
    Once the KEY1_INT_EXTI_LINE line detects the rising edge, the EXTI0 interrupt is generated. In the EXTI0_IRQHandler interrupt processing function (the ControlFlag = 0), 
    the UARTz enters the silent mode. In the silent mode, the LED pin stops toggling until the KEY1_INT_EXTI_LINE line detects the rising edge ( the ControlFlag = 1). 
    In the EXTI0_IRQHandler interrupt processing function, UARTy sends address 0x102 to wake up UARTz. The LED pin restarts toggling.


2. Use environment

	Software development environment: KEIL MDK-ARM V5.34.0.0
    Hardware development environment:
         N32G05x series:
            Developed based on the evaluation board N32G05xRBQ7_STB V1.0
         N32G05x series:
            Developed based on the evaluation board N32G05xRBL7_STB V1.0


3. Instructions for use

    The system clock configuration is as follows:
    -System clock = 64MHz
    
    The UARTy configuration is as follows:
    -Baud rate = 115200 baud
    -Word length = 9 data bits
    -1 stop bit
    -Verification control disabled
    -Receiver and transmitter enable
    
    
    The UART pin connections are as follows:
    - UART1_Tx.PA2   <------->   UART2_Rx.PB5
    - UART1_Rx.PA3   <------->   UART2_Tx.PB4
    
    KEY1_INT_EXTI_LINE.PA4    <------->   KEY1
    
    LED1    <------->   PB0

    
    Test steps and phenomena:
    -After the Demo is compiled in the KEIL environment, download it to the MCU
    -Reset operation, observe whether LED1 are blinking
    -Press the KEY button and observe if LED1 stop flashing
    -Press the KEY button again and observe whether LED1 resume flashing


4. Matters needing attention