共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							跳转至页
		回复
| 有奖活动 | |
|---|---|
| 硬核工程师专属补给计划——填盲盒 | |
| “我踩过的那些坑”主题活动——第002期 | |
| 【EEPW电子工程师创研计划】技术变现通道已开启~ | |
| 发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
| 【EEPW在线】E起听工程师的声音! | |
| 高校联络员开始招募啦!有惊喜!! | |
| 【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
| 送您一块开发板,2025年“我要开发板活动”又开始了! | |


 
			
			
			
						
			 我要赚赏金
 我要赚赏金 STM32
STM32 MCU
MCU 通讯及无线技术
通讯及无线技术 物联网技术
物联网技术 电子DIY
电子DIY 板卡试用
板卡试用 基础知识
基础知识 软件与操作系统
软件与操作系统 我爱生活
我爱生活 小e食堂
小e食堂

