Phatline

micro-second counter?

3 posts in this topic

i need a count from 0-1ms (to modulate the triggerlength for a TR606 - in order to get some velocity-like reaction from the machine)

count is not the problem, more the execution of the function

also to make a RTOS-Task for it - i know very well and use it a lot.... but since now i dont needet anything under 1ms Rate...

 

when change from (taken from tutorial 006_rtos_tasks)

vTaskDelayUntil(&xLastExecutionTime, 1 / portTICK_RATE_MS);

to

vTaskDelayUntil(&xLastExecutionTime, 1 / 10);

has it effect or is it "fixed with min 1ms" ?

are there MIOS functions i can use instead which have a better call-rate?

 

thx 4 info

Share this post


Link to post
Share on other sites

Hi Mike,

I'm not sure but 1ms is the smallest rate you can achieve with RTOS Tasks.
Use MIOS32 Timer instead, the timer can be set to a multiple of 1us

Check this:

Best regards
Bruno

1 person likes this

Share this post


Link to post
Share on other sites

i set:

#define RESOLUTION 		10 // in uS
#define TIMER_NUM 		1 // TIM3
#define TIMER_PRIO 		MIOS32_IRQ_PRIO_HIGH

which give me good timing

 

thx.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now