完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
左边是micrium官网关于STM32F107的代码,右边是发烧友移植到stm32f103代码。 ;******************************************************************************************************** ; PERFORM A CONTEXT SWITCH (From task level) - OSCtxSw() ; ; Note(s) : 1) OSCtxSw() is called when OS wants to perform a task context switch. This function ; triggers the PendSV exception which is where the real work is done. ;******************************************************************************************************** OSCtxSw LDR R0, =NVIC_INT_CTRL ; Trigger the PendSV exception (causes context switch) LDR R1, =NVIC_PENDSVSET STR R1, [R0] BX LR ;******************************************************************************************************** ; PERFORM A CONTEXT SWITCH (From interrupt level) - OSIntCtxSw() ; ; Note(s) : 1) OSIntCtxSw() is called by OSIntExit() when it determines a context switch is needed as ; the result of an interrupt. This function simply triggers a PendSV exception which will ; be handled when there are no more interrupts active and interrupts are enabled. ;******************************************************************************************************** OSIntCtxSw LDR R0, =NVIC_INT_CTRL ; Trigger the PendSV exception (causes context switch) LDR R1, =NVIC_PENDSVSET STR R1, [R0] BX LR AGE 请问多出的这个两个汇编函数,是从哪移植过来的呢?求教! |
|
相关推荐
4个回答
|
|
这两个看像和任务有关
|
|
|
|
这个基本都是用的ucos官方的代码,f107和f103都是m3内核的,所以这个代码可以通用
|
|
|
|
关键是我在107的代码里面没有找到这个
|
|
|
|
是啊,一个是普通任务,还有个是中断任务,用作上下文切换的函数。
|
|
|
|
只有小组成员才能发言,加入小组>>
822 浏览 1 评论
2234 浏览 5 评论
2539 浏览 9 评论
移植了freeRTOS到STMf103之后显示没有定义的原因?
2333 浏览 6 评论
2265 浏览 7 评论
使用eim外接fpga可是端口一点反应都没有有没有大哥指点一下啊
401浏览 9评论
404浏览 7评论
请教大神怎样去解决iMX6Q在linux3.0.35内核上做AP失败的问题呢
519浏览 6评论
391浏览 5评论
423浏览 5评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-7-27 16:21 , Processed in 1.081491 second(s), Total 88, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191