KL03 PE LPTMR Hal Functions Commented Out?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KL03 PE LPTMR Hal Functions Commented Out?

377 Views
embeddedmasters
Contributor I

Hello,

  We are starting a project with the KL03 and are using the LPTMR.  I enable the LPTMR using PE LPTMR component and it never hits the callback function?  In inspecting other areas of the code generated from PE and I look at the fsl_lptmr_hal.c, fsl_lptmr_hal.h, fsl_lptmr_driver.c, fsl_lptmr_driver.h all the functions in these files are 'greyed' out?  They are #if with the FSL_FEATURE_SOC_LPTMR_COUNT which is defined in the MKL03Z4_features.h file which clearly shows the LPTMR as being a feature in this device but all the files are not finding the #define in the features.h file?

 

In MKL03Z4_features.h(referenced from fsl_device_registers.h)

/* @brief LPTMR availability on the SoC. */

#define FSL_FEATURE_SOC_LPTMR_COUNT (1)

 

All the files referenced above have functions such as what is shown below greyed out because it apparently is not finding the definition of #define FSL_FEATURE_SOC_LPTMR_COUNT (1)??

/*FUNCTION**********************************************************************

*

* Function Name : LPTMR_DRV_Start

* Description   : Start LPTMR counter

* This function will start LPTMR internal counter to count the time or pulse

*

*END**************************************************************************/

lptmr_status_t LPTMR_DRV_Start(uint32_t instance)

{

    assert(instance < LPTMR_INSTANCE_COUNT);

    assert(CLOCK_SYS_GetLptmrGateCmd(instance));

 

    LPTMR_Type * base = g_lptmrBase[instance];

 

    LPTMR_HAL_Enable(base);

 

    return kStatus_LPTMR_Success;

}

 

Ultimately I am just trying to get the LPTMR running and have it go to either the Interrupt or the callback and have not been able to get either method to work...

 

Regards,

Frank

Labels (1)
0 Kudos
1 Reply

257 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Frank,

The KSDK software V1.3.0 provides LPTMR example at below folder:

C:\Freescale\KSDK_1.3.0\examples\frdmkl03z\driver_examples\lptmr

Wish it helps.


Have a great day,
Ma Hui

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

0 Kudos