[MQX4]: where are definitions for low power timer APIs?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

[MQX4]: where are definitions for low power timer APIs?

跳至解决方案
1,506 次查看
huishao2
Contributor IV

Hi-

Where can I find the APIs document for low power timers like:

_lpt_install();

_lpt_run()

...

Thanks!

Hui

0 项奖励
回复
1 解答
1,324 次查看
soledad
NXP Employee
NXP Employee

Sorry for my misunderstanding, do you refer to the hardware timer like the LPTMR?

In this case please check the HWTimer driver (new, experimental), this driver provides a C language API for uniform access to the features of various HW timer modules such as PIT, SysTick, etc.

The source code for HWTIMER drivers is located in source\io\hwtimer directory.

All API functions take a pointer to caller allocated HWTIMER structure keeping the context necessary for the driver. This structure is opaque to the caller. The main purpose of the upper layer API is to provide the

abstraction of the hardware specific lower layer driver.

For more information about this driver please check the Freescale MQX™ RTOS I/O Drivers User’s Guide (chapter 27)

In addition, you can find an example at the path C:\Freescale\Freescale_MQX_4_1\mqx\examples\hwtimer, this example shows usage of HW timer driver abstraction. Demonstrates how to initialize HW timer for various modules, set frequency, callback, start, and stop the timer.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,324 次查看
soledad
NXP Employee
NXP Employee

Hi Hui Shao,

Please check the Freescale MQX™ RTOS I/O Drivers User’s Guide that you can find at the path: C:\Freescale\Freescale_MQX_4_1\doc\mqx

The Chapter 21 describes the Low Power Manager (LPM) that accompanies the MQX RTOS.

I hope this helps,


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,324 次查看
huishao2
Contributor IV

Hi Sol,

I just went through the chapter and couldn’t find lpt related APIs. It is about lpm related power management APIs. What I am looking for are the descriptions for low power timer.

Thanks and regards

Hui

0 项奖励
回复
1,325 次查看
soledad
NXP Employee
NXP Employee

Sorry for my misunderstanding, do you refer to the hardware timer like the LPTMR?

In this case please check the HWTimer driver (new, experimental), this driver provides a C language API for uniform access to the features of various HW timer modules such as PIT, SysTick, etc.

The source code for HWTIMER drivers is located in source\io\hwtimer directory.

All API functions take a pointer to caller allocated HWTIMER structure keeping the context necessary for the driver. This structure is opaque to the caller. The main purpose of the upper layer API is to provide the

abstraction of the hardware specific lower layer driver.

For more information about this driver please check the Freescale MQX™ RTOS I/O Drivers User’s Guide (chapter 27)

In addition, you can find an example at the path C:\Freescale\Freescale_MQX_4_1\mqx\examples\hwtimer, this example shows usage of HW timer driver abstraction. Demonstrates how to initialize HW timer for various modules, set frequency, callback, start, and stop the timer.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,324 次查看
huishao2
Contributor IV

Sorry, Sol, a bit confusing here. What I am asking about is the timer that runs in low power modes. I don't see the _lpt_xxx() APIs are in HWTimer in Chapter 27. I see the code is defined in mqx\source\io\timer\timer_lpt.c, any documentation for it?

Thanks!

Hui

0 项奖励
回复