micro-second counter?

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

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:

< base_url >/topic/20971-blink-led-with-ng-code-sharing/?do=embed&embedComment=182682&embedDo=findComment

Best regards
Bruno

1 Like

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.