ucos的问题【恢复】
我用的是官方的例子当程序执行到:OSStart();后到了:这是不下走了:OSStartHighRdy
LDR R4, =NVIC_SYSPRI2 ; set the PendSV exception priority
LDR R5, =NVIC_PENDSV_PRI
STR R5,
MOV R4, #0 ; set the PSP to 0 for initial context switch call
MSR PSP, R4
LDR R4, =OSRunning ;//设置OSRunning = TRUE
MOV R5, #1
STRB R5,
;//切换到最高优先级的任务
LDR R4, =NVIC_INT_CTRL ; trigger the PendSV exception (causes context switch)
LDR R5, =NVIC_PENDSVSET
STR R5,
CPSIE I ; enable interrupts at processor level
OSStartHang
B OSStartHang ; should never get here OSStartHang
B OSStartHang ; should never get here 停止到这里 回复【楼主位】daicheng
-----------------------------------------------------------------------
我也遇到了相同的问题,不知道你是否找到了解决办法 我用3.3的库无此问题,楼上把你的工程传上来看看。 回复【楼主位】daicheng
我用的是官方的例子当程序执行到:osstart();后到了:
这是不下走了:osstarthighrdy
ldr r4, =nvic_syspri2 ; set the pendsv exception priority
ldr r5, =nvic_pendsv_pri
str r5,
mov r4, #0 ; set the psp to 0 for initial context switch call
msr psp, r4
ldr r4, =osrunning ;//设置osrunning = true
mov r5, #1
s......
-----------------------------------------------------------------------
内核这句开中断后,不会进入到OSStartHang.原因可能是你的中断函数有问题,或者没有开启.不知楼主用什么CPU呢?
CPSIE I ; enable interrupts at processor level
OSStartHang
B OSStartHang ; should never get here
页:
[1]