Hardware Timer (hw_timer.h) usage

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I read some similar discussions, but still I have a questions about usage of hw_timer.h .

1. How can I compile to use this?

Currently, I added a line above to bottom of makefile.mk .

APP_PATCHES_AND_LIBS += hw_timer.a

Is this way is correct?

2. Is there need some initialization to use this?

It seems only 3 functions are defined in hw_timer.h to user, but don't have an init func.

If Q.1 is correct, I can not get an interrupt. Is there need some interrupt settings to use hw_timer?

Thank you,

0 Likes
1 Solution
Anonymous
Not applicable

Hi kwang and kawamura-san,

My makefile.mk is the following.

C_FLAGS += -std=gnu99

APP_SRC = Mosic.c Mosic_db.c

APP_PATCHES_AND_LIBS += hw_timer.a

hw_timer works fine.

View solution in original post

5 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

Kevin recently furnished some sample code with regards to the use of hw_timer. Let us know if it helps.

How to use 100us interval timer?

kwang

0 Likes
Anonymous
Not applicable

I already read it and sample code is very helpful for me.

But, There have no answer for my Question 1.

Question 1 is about environment setting of SDK not a code.

Thank you,

0 Likes
Anonymous
Not applicable

I know another user just reported that they got hw_timer working

could you help with this? moicci

0 Likes
Anonymous
Not applicable

Hi kwang and kawamura-san,

My makefile.mk is the following.

C_FLAGS += -std=gnu99

APP_SRC = Mosic.c Mosic_db.c

APP_PATCHES_AND_LIBS += hw_timer.a

hw_timer works fine.

Anonymous
Not applicable

Hello yuichi,

Answer to question 1:

APP_PATCHES_AND_LIBS += hw_timer.a

Yes, this is correct

Thanks

JT

0 Likes