当前位置:首页 > 单片机 > 单片机
[导读]  Core Timer is a very popular feature of PIC32 since it isa piece of the MIPS M4K core itself and is common to all MIPS processors. Most RTOS's timer are based on core timer. This timer has a f

  Core Timer is a very popular feature of PIC32 since it isa piece of the MIPS M4K core itself and is common to all MIPS processors. Most RTOS's timer are based on core timer. This timer has a fixed prescaler 1:2, and it is a 32-bit timer, no need to combine with two 16-bit timer like we do with other timers (Timer2 and Timer3 or Timer4 and Timer5). At this moment I only use core timer to implement time delay. To accomplish it, I write two functions: ReadCoreTimer() and CoreT_DelayMs().

  


unsignedint__attribute__((nomips16))ReadCoreTimer(void){unsignedinttimer;//getthecountregasmvolatile("mfc0%0,$9":"=r"(timer));returntimer;}voidCoreT_DelayMs(unsignedintdelayMs){unsignedintdelayStart;delayStart=ReadCoreTimer();while((ReadCoreTimer()-delayStart)<(delayMs*CORE_TIMER_MILLISECONDS));}



本站声明: 本文章由作者或相关机构授权发布,目的在于传递更多信息,并不代表本站赞同其观点,本站亦不保证或承诺内容真实性等。需要转载请联系该专栏作者,如若文章内容侵犯您的权益,请及时联系本站删除。
换一批
延伸阅读

嵌入式Linux开发中,使用gdb对core文件进行调试是一种有效的定位程序崩溃的方法。这种方法我们在之前的文章中也有简单提过:嵌入式段错误的3种调试方法汇总!

关键字: 嵌入式Linux gdb core

(全球TMT2021年12月22日讯)智能传感器和信标技术领域企业SENSORO(北京升哲科技有限公司)宣布与 Graphcore合作,打造基于 IPU 计算系统的城市 ESG(环境、社会和治理)端到端解决方案。Gra...

关键字: core SENSOR

弗吉尼亚州雷斯顿2021年11月24日 /美通社/ -- 跨平台媒体规划、交易和评估领域值得信赖的合作伙伴Comscore(纳斯达克股票代码:SCOR)欣然宣布任命 ...

关键字: core

(全球TMT2021年11月24日讯)跨平台媒体规划、交易和评估领域值得信赖的合作伙伴Comscore宣布任命 Han Seng Lim先生担任Comscore东南亚客户服务首席顾问。这一职位将为Comscore在亚太...

关键字: core

在验证环境中checker可以通过两种方式使用scoreboard。这两种方法之间的主要区别在于参考模型处于哪个组件当中。 第一种方法,checker组件包含参考模型。此时,scoreboard的角色是存储DUT的输入,...

关键字: board core

前言:coredump分析是嵌入式linux开发中经常使用的方法,我们也可以经常看到相关的使用教程,但是网上很少有一个多线程应用coredump文件的分析过程介绍,今天我来分享一下自己实际使用中一些案例,来给大家进行一下...

关键字: core

印度班加罗尔2021年7月28日 /美通社/ -- Sonata Software今天宣布签署最终协议,收购总部位于硅谷的IT服务公司Encore Sof

关键字: core

“银河A3核心”正式推出,并表示要列出各种奖品。不难想象,这么低的价格对我们来说是个坏兆头。将为用户提供以前型号的手机,没有精致的底盘和奢侈品大约一个看实心镜子和塑料身体

关键字: galaxy a3 core androidgo

从Visual Studio 2019 v16.8 Preview 3开始,我们在WSL(Linux的Windows子系统)或远程Linux系统上添加了对Linux Core Dump的调试支持。 此支持仅适用于非托管代...

关键字: visual studio Linux core dump

  今日芯语   去年六月,英特尔在台北电脑展上发布了酷睿M,此后联想和戴尔也相继发布了搭载酷睿M处理器的产品,而苹果近日推出的全新MacBook,更是使得酷睿M处理器进一步升温。全新M

关键字: core m macbook 无人驾驶 英特尔
关闭
关闭