AnsweredAssumed Answered

Proper hwtimer bsp definition

Question asked by James Monczynski on Sep 10, 2014
Latest reply on Sep 17, 2014 by James Monczynski

I need to change hwtimer2 definition.

After creating my custom k70, the default is:

 

/* HWTIMER definitions for user applications */

#define BSP_HWTIMER1_DEV        pit_devif

#define BSP_HWTIMER1_SOURCE_CLK (CM_CLOCK_SOURCE_BUS)

#define BSP_HWTIMER1_ID         (0)

 

#define BSP_HWTIMER2_DEV      lpt_devif

#define BSP_HWTIMER2_SOURCE_CLK (CM_CLOCK_SOURCE_LPO)

#define BSP_HWTIMER2_ID         (0)

 

because I needed a pit timer, not an lpo, I changed it to:

 

/* HWTIMER definitions for user applications */

#define BSP_HWTIMER1_DEV        pit_devif

#define BSP_HWTIMER1_SOURCE_CLK (CM_CLOCK_SOURCE_BUS)

#define BSP_HWTIMER1_ID         (0)

 

#define BSP_HWTIMER2_DEV        pit_devif             //was lpt_devif

#define BSP_HWTIMER2_SOURCE_CLK (CM_CLOCK_SOURCE_BUS) //was (CM_CLOCK_SOURCE_LPO)

#define BSP_HWTIMER2_ID         (1)

 

I would like to know if this is the proper/standard way of updating the hwtimer definition?

Or, is there another way using the user_config.h to do the same (I couldn't find any setting for hwtimers).

 

Thanks for any info.

Outcomes