Microchip
直播中

赵文隽

7年用户 131经验值
私信 关注
[问答]

系统服务定时器可以使用静态定时器驱动程序吗?

你好!我在mplabx 3.10上工作,在“pic32mz with fpu和crypto ingine嵌入式连接启动器工具箱”板上运行程序。我的程序是基于一个与HARMony:pic32_eth_web_server一起提供的示例。我需要添加一个低延迟中断例程,它必须每0,5ms调用一次,而不需要使用除外。我想我应该把定时器驱动类型转换为静态定时器。在Harmony中切换这个并将定时器周期设置为某个值(例如,4000)之后,示例停止工作,我不知道为什么。系统服务定时器可以使用静态定时器驱动程序吗?也许有人有类似的问题,可以告诉我为什么这个例子在切换定时器驱动类型之后停止工作?

以上来自于百度翻译


      以下为原文

    Hi!
I am working on mplabx 3.10 and running program on "pic32mz with fpu and crypto ingine embedded connectivity starter kit" board.

My program is based on an example provided with Harmony: pic32_eth_web_server.
I need to add  a low latency interrupt routine, which has to be called every 0,5 ms without any exceptions.
I figured out that I should switch type of the timer driver to static one. After just switching this in Harmony and setting timer period to some value (e.g. 4000) the example stops working and I don't know why.

Can system service timer use static timer driver?
Maybe someone had similar problem and can point me why the example stops working after switching timer driver type?

回帖(4)

陈晨

2019-7-12 12:28:59
北佬。你可以设置一个有中断的定时器。定时器驱动程序不是定时器服务。您可以将Harmony系统定时器的HW定时器设置为500uSec。然后将附加代码放入中断中。Harmony回调不会是最小延迟。

以上来自于百度翻译


      以下为原文

    Per North guy.
You can setup a timer with an interrupt in Harmony.  Timer driver not Timer service.
You can set the HW timer for the Harmony system timer to you 500uSec.
Then put your additional code in the interrupt.
 
The Harmony callback will not be minimum latency.
举报

程春华

2019-7-12 13:28:43
我将驱动器从静态切换为动态。我正在跟随开发指南的动态驱动程序。但是得到2个错误。DRVYTMRMARALARM寄存器(MyPr把手,除法器,**真,0,MyISR);1。一元“*”(“int”)的无效类型参数(*pclier->ALARM回调)(pclier-& gt;上下文,*pclier->alcActudio);2.一元“*”的无效类型自变量(有'''uuth3xt t ')吗?有人面对这些情况吗?

以上来自于百度翻译


      以下为原文

    I switched the driver to dynamic from static. I was following the developer guide for dynamic driver. But getting 2 errors. 
DRV_TMR_AlarmRegister(MyHandle, divider,** true, 0 , MyISR);
1. invalid type argument of unary '*' (have 'int')
(*pClient->alarmCallback)( pClient->context, *pClient->alarmCount);
2. invalid type argument of unary '*' (have '__uint32_t')
Anyone faced these situations?
举报

陈晨

2019-7-12 13:39:39
这个函数的原型是什么,你传递给它的变量的定义是什么?**真的吗?那应该是什么?

以上来自于百度翻译


      以下为原文

    What is the the prototype for the function and what are the definitions for the variables you're passing to it ?
**true ? What is that supposed to be ?
举报

范云力

2019-7-12 13:50:22
有趣-双重取消点,地址为1前!

以上来自于百度翻译


      以下为原文

   


interesting - double dereferenced point with address of 1 presuambly!
举报

更多回帖

发帖
×
20
完善资料,
赚取积分