共2条
1/1 1 跳转至页
2104,ucos 请问周工 为什么2104在ucos仅中断一次

问
请问周工 为什么2104在ucos外部中断0仅中断一次? 我的程式采用
void TargetInit(void)
{ extern void IRQ_Handler(void);
extern void Timer0_Handler(void);
OS_Enter_CRITICAL();
srand((uint32) TargetInit);
VICIntEnClr=0xfffffffff;
VICDefVecAddr=(uint32)IRQ_Handler; 向量地址
VICVectAddr0=(0x20|0x04);
VICIntSelect=0x00000000; IRQ中断
VICIntEnable=0x0004010;使能时钟0和EINT0中断
EXTINT=0x07; //清除外部中断
T0IR=0xffffffff;
T0TC=0;
T0TCR=0x01;
T0MCR=0x01;
T0MR0=(Fpclk/OS_TICKS_PER_SEC);
OS_EXIT_CRITICAL();
}
答 1: 向量中断寄存器设置有误,请仔细阅读数据手册和附带例程。例如:
VICIntSelect = 0x00000000; // 设置所有中断分配为IRQ中断
VICVectCntl0 = 0x2F; // 分配EINT1中断到向量中断0
VICVectAddr0 = (int)IRQ_Eint1; // 设置中断服务程序地址
EXTINT = 0x02; // 清除EINT1中断标志
VICIntEnable = 0x00008000; // 使能EINT1中断
答 2: 你想调试uCOS/II的内核么?uCOS/II 调试利器----JEDIviewLite
可以透视内核的各种状态( System Pane,Task Pane,Queue Pane,Mailbox Pane,Event Flags Pane,Semaphore Pane,Memory Pane,Mutex Pane )支持任务级和线程级调试,包括设断点,观察进程及线程内函数及模块的变量;起停某个线程及线程间的切换关系。这是调试基于 RTOS 应用程序的必备开发工具,此功能起到真正透视内核的作用,否则,无法知道 RTOS 的各个任务的运行状态.
可以调试查看下列OS 信息:
• System Pane Windows
System Pane lists seven fundamental components of uCOS-II and its corresponding number of current members
• Task Pane Windows
The Task Pane shows a list of all tasks in the system, arranged in the order they were created. When a task is deleted, it disappears from this list.
• Queue Pane Windows
• Mailbox Pane Windows
• Event Flags Pane Windows
• Semaphore Pane Windows
• Memory Pane Windows
Name - The name of the memory block.
Address - The starting address of memory block.
Free Blocks - Free blocks and all blocks count.
Block Size - The size, in bytes, of each memory block in the pool. Block sizes displayed here are rounded up by the uCOS-II kernel to an even multiple of four bytes to allow suitable alignment for the one pointer of overhead.
• Mutex Pane Windows
In addition to semaphores, uCOS-II also provides a mutex object. A mutex is basically a binary semaphore, which means that only one task CAN own a mutex at a time .In addition, the same task may perform a successful mutex get operation on an owned mutex multiple times, 4,294,967,295 to be exact.
需要详细资料请留邮件地址。。
或参看http://www.micetek.com.cn/jediview/rtos.htm
价格为 RMB4990一套(送高档JTAG仿真器一台)
联系电话:13714634763 黄生 答 3: srand((uint32) TargetInit);请教一下,这一句是什么意思?
void TargetInit(void)
{ extern void IRQ_Handler(void);
extern void Timer0_Handler(void);
OS_Enter_CRITICAL();
srand((uint32) TargetInit);
VICIntEnClr=0xfffffffff;
VICDefVecAddr=(uint32)IRQ_Handler; 向量地址
VICVectAddr0=(0x20|0x04);
VICIntSelect=0x00000000; IRQ中断
VICIntEnable=0x0004010;使能时钟0和EINT0中断
EXTINT=0x07; //清除外部中断
T0IR=0xffffffff;
T0TC=0;
T0TCR=0x01;
T0MCR=0x01;
T0MR0=(Fpclk/OS_TICKS_PER_SEC);
OS_EXIT_CRITICAL();
}
答 1: 向量中断寄存器设置有误,请仔细阅读数据手册和附带例程。例如:
VICIntSelect = 0x00000000; // 设置所有中断分配为IRQ中断
VICVectCntl0 = 0x2F; // 分配EINT1中断到向量中断0
VICVectAddr0 = (int)IRQ_Eint1; // 设置中断服务程序地址
EXTINT = 0x02; // 清除EINT1中断标志
VICIntEnable = 0x00008000; // 使能EINT1中断
答 2: 你想调试uCOS/II的内核么?uCOS/II 调试利器----JEDIviewLite
可以透视内核的各种状态( System Pane,Task Pane,Queue Pane,Mailbox Pane,Event Flags Pane,Semaphore Pane,Memory Pane,Mutex Pane )支持任务级和线程级调试,包括设断点,观察进程及线程内函数及模块的变量;起停某个线程及线程间的切换关系。这是调试基于 RTOS 应用程序的必备开发工具,此功能起到真正透视内核的作用,否则,无法知道 RTOS 的各个任务的运行状态.
可以调试查看下列OS 信息:
• System Pane Windows
System Pane lists seven fundamental components of uCOS-II and its corresponding number of current members
• Task Pane Windows
The Task Pane shows a list of all tasks in the system, arranged in the order they were created. When a task is deleted, it disappears from this list.
• Queue Pane Windows
• Mailbox Pane Windows
• Event Flags Pane Windows
• Semaphore Pane Windows
• Memory Pane Windows
Name - The name of the memory block.
Address - The starting address of memory block.
Free Blocks - Free blocks and all blocks count.
Block Size - The size, in bytes, of each memory block in the pool. Block sizes displayed here are rounded up by the uCOS-II kernel to an even multiple of four bytes to allow suitable alignment for the one pointer of overhead.
• Mutex Pane Windows
In addition to semaphores, uCOS-II also provides a mutex object. A mutex is basically a binary semaphore, which means that only one task CAN own a mutex at a time .In addition, the same task may perform a successful mutex get operation on an owned mutex multiple times, 4,294,967,295 to be exact.
需要详细资料请留邮件地址。。
或参看http://www.micetek.com.cn/jediview/rtos.htm
价格为 RMB4990一套(送高档JTAG仿真器一台)
联系电话:13714634763 黄生 答 3: srand((uint32) TargetInit);请教一下,这一句是什么意思?
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【EEPW电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
“我踩过的那些坑”主题活动——第001期 | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
【我踩过的那些坑】结构堵孔导致的喇叭无声问题被打赏50分 | |
【我踩过的那些坑】分享一下调试一款AD芯片的遇到的“坑”被打赏50分 | |
电流检测模块MAX4080S被打赏10分 | |
【我踩过的那些坑】calloc和malloc错误使用导致跑飞问题排查被打赏50分 | |
多组DCTODC电源方案被打赏50分 | |
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 | |
新手必看!C语言精华知识:表驱动法被打赏50分 | |
【我踩过的那些坑】杜绑线问题被打赏50分 | |
【我踩过的那些坑】STM32的硬件通讯调试过程的“坑”被打赏50分 | |
【我踩过的那些坑】晶振使用的问题被打赏100分 |