这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 综合技术 » 基础知识 » 2104,ucos 请问周工 为什么2104在ucos仅中断一次

共2条 1/1 1 跳转至

2104,ucos 请问周工 为什么2104在ucos仅中断一次

院士
2006-09-17 18:14:16     打赏
2104,ucos 请问周工 为什么2104在ucos仅中断一次



关键词: 请问     周工     为什么     中断     一次    

院士
2006-12-22 22:43:00     打赏
2楼
问 请问周工 为什么2104ucos外部中断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);请教一下,这一句是什么意思?

共2条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]