完善资料让更多小伙伴认识你,还能领取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的代码里面没有找到这个
|
|
|
|
|
|
是啊,一个是普通任务,还有个是中断任务,用作上下文切换的函数。
|
|
|
|
|
只有小组成员才能发言,加入小组>>
1026 浏览 1 评论
1856 浏览 0 评论
1837 浏览 1 评论
3261 浏览 5 评论
3587 浏览 9 评论
1026浏览 1评论
1853浏览 1评论
如何知道嵌入式电子控制单元 (ECU) 中的RAM使用情况?
1365浏览 1评论
1856浏览 0评论
1181浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-3 05:55 , Processed in 0.750309 second(s), Total 82, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
11925