lptmr and ftm components both define HAL_TimerInit

cancel
Showing results for 
Search instead for 
Did you mean: 

lptmr and ftm components both define HAL_TimerInit

155 Views
Contributor IV

I've since realized I don't need the abstraction layer, but I figured I report this problem. Using MCUXpresso 11.1 and SDK 2.7.0 for a new K64 project I included both the ftm_adapter and the lptmr_adapter abstaction layer in my build. Doing so creates a compilation error as both ftm_adapter.c and lptmr_adapter.c define HAL_TimerInit()

4 Replies

5 Views
NXP TechSupport
NXP TechSupport

Hello, Larry

Thank you for your observation, I will report this issue. 
Have a great day,
Diego

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

5 Views
NXP TechSupport
NXP TechSupport

Hello, yorknh

Thank you for your patience and  for taking the time to make this post, here is an update, 

The timer adapter abstraction layers for LPTMR, FTM, and PIT, of SDK, share public functions, in example the  HAL_TimerInit() that you mentioned,  and only one of them is intended to be included in a project, others have to be removed. 

This is explained further in the timer.h file, which is located in SDK 2.7.0 of FRMD-K64F

*!
* @brief The timer adapter component
*
* The timer adapter is built based on the timer SDK driver provided by the NXP
* MCUXpresso SDK. The timer adapter could provide high accuracy timer for user.
* Since callback function would be handled in ISR, and timer clock use high
* accuracy clock, user can get accuracy millisecond timer.
*
* The timer adapter would be used with different HW timer modules like FTM, PIT, LPTMR.
* But at the same time, only one HW timer module could be used. On different platforms, different
* HW timer module would be used. For the platforms which have multiple HW timer modules,
* one HW timer module would be selected as the default, but it is easy to change the default
* HW timer module to another. Just two steps to switch the HW timer module:
* 1.Remove the default HW timer module source file from the project
* 2.Add the expected HW timer module source file to the project.
* For example, in platform FRDM-K64F, there are two HW timer modules available, FTM and PIT.
* FTM is used as the default HW timer, so ftm_adapter.c and timer.h is included in the project by
* default. If PIT is expected to be used as the HW timer, ftm_adapter.c need to be removed from the
* project and pit_adapter.c should be included in the project
*/

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

5 Views
Contributor IV

Thank you for the clarification. I would "Mark Correct", but I don't see the button anywhere.

0 Kudos

5 Views
NXP TechSupport
NXP TechSupport

Thank you, Larry,  usually, if I'm not wrong, the correct button is located in the upper right corner of the answer. But anyway, it is a pleasure to help. 

0 Kudos