你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

STM32 如何快速创建 FREERTOS和RTX 工程  

[复制链接]
lovewyufeng 发布时间:2015-1-8 12:08
阅读主题, 点击返回1楼
收藏 14 评论97 发布时间:2015-1-8 12:08
97个回答
lovewyufeng 回答时间:2015-1-8 12:52:49

看帖 应该  就知道很好用了  基本上 点几下鼠标就创建一个可以直接使用的  工程
cxtarm 回答时间:2015-1-8 12:54:34
lovewyufeng 发表于 2015-1-8 12:52
看帖 应该  就知道很好用了  基本上 点几下鼠标就创建一个可以直接使用的  工程 ...

那只是可用,效率怎么样呢
lovewyufeng 回答时间:2015-1-8 12:56:36
cxtarm 发表于 2015-1-8 12:54
那只是可用,效率怎么样呢

本人建议  库只用于 比较复杂的 外设初始化 比如  串口 ,SPI SDIO等等

初始化完成之后的操作 建议使用寄存器
ewfty 回答时间:2015-1-8 13:12:10
在实际开发中,我还是喜欢裸奔,不过像这些OS学习还是可以的。
yceast 回答时间:2015-1-8 13:21:50
很好啊
moyanming2013 回答时间:2015-1-8 15:58:52
前来支持
我是东哥 回答时间:2015-1-8 16:20:57
看Freertos头文件Semphr.h的注释。
2) Resource management.
*    In this usage scenario the count value indicates the number of resources
*    available.  To obtain control of a resource a task must first obtain a
*    semaphore - decrementing the semaphore count value.  When the count value
*    reaches zero there are no free resources.  When a task finishes with the
*    resource it 'gives' the semaphore back - incrementing the semaphore count
*    value.  In this case it is desirable for the initial count value to be
*    equal to the maximum count value, indicating that all resources are free.
我是东哥 回答时间:2015-1-8 16:28:35
这种用法应该是先take,再give回去。而不是像第一种用法(也就是楼主说的常用用法)那样,需要先give,然后才能take。
我是东哥 回答时间:2015-1-8 16:31:40
刚刚贴的代码怎么不见了?再贴一遍头文件中的注释,很明了:
* Counting semaphores are typically used for two things:
*
* 1) Counting events.
*
*    In this usage scenario an event handler will 'give' a semaphore each time
*    an event occurs (incrementing the semaphore count value), and a handler
*    task will 'take' a semaphore each time it processes an event
*    (decrementing the semaphore count value).  The count value is therefore
*    the difference between the number of events that have occurred and the
*    number that have been processed.  In this case it is desirable for the
*    initial count value to be zero.
*
* 2) Resource management.
*
*    In this usage scenario the count value indicates the number of resources
*    available.  To obtain control of a resource a task must first obtain a
*    semaphore - decrementing the semaphore count value.  When the count value
*    reaches zero there are no free resources.  When a task finishes with the
*    resource it 'gives' the semaphore back - incrementing the semaphore count
*    value.  In this case it is desirable for the initial count value to be
*    equal to the maximum count value, indicating that all resources are free.
lovewyufeng 回答时间:2015-1-8 21:29:57
我是东哥 发表于 2015-1-8 16:28
这种用法应该是先take,再give回去。而不是像第一种用法(也就是楼主说的常用用法)那样,需要先give,然后 ...

是的  因为我的 资源一开始是不可用的  

这是典型的 生产消费问题

串口接收数据(生产)

线程消费数据  

一开始是没有现成的数据的

而这个 函数接口  只能以另一种方式使用那就是一开始就存在资源,这在实际使用中是不合理的!!
serge 回答时间:2015-1-8 21:50:06
支持楼主,留下记号,还能拿钱
lovewyufeng 回答时间:2015-1-9 08:38:07
serge 发表于 2015-1-8 21:50
支持楼主,留下记号,还能拿钱

哈哈 你来晚了钱都被他们拿完了~~
ataudio 回答时间:2015-1-13 14:16:31
楼主强帖,当然要支持了。好好向楼主学习。
maxiaoxiaoq 回答时间:2015-1-13 14:21:50
好贴,正好用的着啊。。
w453509596 回答时间:2015-1-13 23:25:01
楼主写的太好了,刚拿到开发板,我要好好学习一下

所属标签

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版