freertos demo 例程:CORTEX_STM32F103_Keil

其对应的板子为:
https://www.freertos.org/portstm32iar.html#SourceCodeOrg
\FreeRTOSV8.2.3\FreeRTOS\Demo\CORTEX_STM32F103_Keil
这里写图片描述

This page describes the FreeRTOS demo application for the STMicroelectronics STM32 ARM Cortex-M3 microcontroller. The demo uses the IAR Embedded Workbench development tools for ARM, and is preconfigured to run on the STM32 evaluation board from ST (instructions are provided should you wish to use an alternative development board). The evaluation board is fitted with an STM32F103VB microcontroller that contains 128KBytes of on board flash and 20KBytes of on board RAM. The STM32F103VB also includes both USB and CANbus peripherals.
Note: If this project fails to build then it is likely the version of IAR Embedded Workbench being used is too old. If this is the case, then it is also likely that the project file has been (silently) corrupted and will need to be restored to its original state before it can be built even with an updated IAR version.

这个对应的板子名字应该是:
STM103V100是英蓓特公司新推出的一款基于ST意法半导体STM32系列处理器(Cortex-M3内核)的全功能评估板
Base Board V100主板主要性能: 
◆3路可选电源,分别是外接5VDC供电,USB供电,子板供电 ◆一个SD存储卡接口 
◆TFT LCD和16x2字符型液晶接口
◆一个可以具有控制四个方向和确定功能的摇杆手柄 
◆四个按键分别是Reset,Wakeup,Temper和User按键 
◆四个Led灯 

这里写图片描述

https://wenku.baidu.com/view/67f536728762caaedc33d477.html

2 comtest 例子

This version of comtest. c is for use on systems that have limited stack
space and no display facilities.
The complete version can be found in the Demo/Common/Full directory.

ThirdParty\FreeRTOS111\FreeRTOSV8.2.3\FreeRTOSV8.2.3\FreeRTOS\Demo\Common\Full\comtest.c

Creates two tasks that operate on an interrupt driven serial port. A
loopback connector should be used so that everything that is transmitted is
also received. The serial port does not use any flow control. On a
standard 9way ‘D’ connector pins two and three should be connected together.

串口的DB9 的管脚2和3 ,连接到一块

The first task posts a sequence of characters to the Tx queue, toggling an
LED on each successful post. At the end of the sequence it sleeps for a
pseudo-random period before resending the same sequence.

第一个任务,发送 字符串 到TX 队列,成功发送之后,会点亮LED的状态。
发送之后,任务1会sleep 一个随机的时间。然后再次发送 之前的 字符串。

The UART Tx end interrupt is enabled whenever data is available in the Tx
queue. The Tx end ISR removes a single character from the Tx queue and
passes it to the UART for transmission.
当Tx 队列中有数据的时候,UART TX 发送 空 中断 被使能。
中断服务程序,从Tx队列中移走一个字符,并且通过UART发送。

The second task blocks on the Rx queue waiting for a character to become
available.

第二个任务
When the UART Rx end interrupt receives a character it places
it in the Rx queue, waking the second task.
The second task checks that the
characters removed from the Rx queue form the same sequence as those posted
to the Tx queue, and toggles an LED for each correct character.

The receiving task is spawned with a higher priority than the transmitting
task. The receiver will therefore wake every time a character is
transmitted so neither the Tx or Rx queue should ever hold more than a few
characters.

重点看:
Nu_LB_NUC140_BSP\ThirdParty\FreeRTOS\Demo\CORTEX_STM32F103_Keil\serial\serial.c 的实现
Nu_LB_NUC140_BSP\ThirdParty\FreeRTOS\Demo\Common\Minimal\comtest.c
Nu_LB_NUC140_BSP\ThirdParty\FreeRTOS\Demo\Common\Minimal\comtest_strings.c
Nu_LB_NUC140_BSP\ThirdParty\FreeRTOS\Demo\Common\Full\comtest.c

(稍后补充)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值