1、功能说明

    此例程为FreeRTOS调度线程通过信号量来切换LED灯的示例。创建两个线程1、2，线程1的优先级高于线程2。线程1首先获得信号量，并且在接下来的5s内每200ms切换一次LED1,然后释放信号量并挂起自己。线程1挂起后线程2将获取信号量并执行，一旦开始执行，线程2将恢复线程1，系统调度执行线程1。但由于此时信号量被线程2抢占，线程1不会成功执行进而执行线程2，在接下来的5s内每200ms切换一次LED2,然后释放掉信号量。

2、使用环境

    软件环境：
        KEIL MDK-ARM 5.34.0
        IAR EWARM 8.50.1
    
    芯片支持：
        N32H730  
        N32H735   
        N32H735EC
        N32H760
        N32H762
        N32H765
        N32H765EC
        N32H785
        N32H785EC
        N32H787

3、使用说明

    1、时钟源：HSI+PLL
    2、系统时钟：
        M7核：600MHz
    3、LED配置：
        LED1 <----------> PJ14
        LED2 <----------> PJ15
    4、使用方法：
        a，编译下载代码复位运行
        b，LED1周期性的闪烁5s后切换成LED2周期性的闪烁5s，由此循环，说明系统正在正确运行。

4、注意事项
     1、systick作为时间基准源，并配置为1ms tick 


1. Function description

    This is an example of FreeRTOS scheduling threads to switch LEDs via semaphores. Two threads 1 and 2 are created, thread 1 has higher priority than thread 2. thread 1 first gets the signal quantity and switches LED1 every 200ms for the next 5s, then releases the signal quantity and hangs itself. After thread 1 hangs up, thread 2 will get the signal quantity and execute it, once it starts to execute, thread 2 will restore thread 1, and the system schedules to execute thread 1. However, since the signal quantity is seized by thread 2 at this time, thread 1 will not be executed successfully, and then thread 2 will be executed, and it will switch the LED2 once in every 200ms in the next 5s, and then it will release the signal quantity.

2. Development environment

    Software environment:
        KEIL MDK-ARM 5.34.0
        IAR EWARM 8.50.1
    
    Supported chips:
        N32H730  
        N32H735   
        N32H735EC
        N32H760
        N32H762
        N32H765
        N32H765EC
        N32H785
        N32H785EC
        N32H787

3. How to use

    1. Clock source: HSI+PLL
    2. System clock:
        M7 core: 600MHz
    3. LED Configuration:
        LED1 <----------> PJ14
        LED2 <----------> PJ15
    4. Usage:
        a. Compile download code reset run.
        b. LED1 periodically blinks for 5s and then switches to LED2 periodically blinks for 5s, thus cycling, indicating that the system is running correctly.

4. Attention
    1. systick is used as the time base source and configured as a 1ms tick 

	