2024-06-22 02:42 AM
Hello Team,
Want to use systick timer for time base of 1uS without interrupt.
Please help me on this to configure it without interrupt.
Regards,
Sachin N
2024-06-22 04:06 AM
Hi,
>can i use systick timer for 1us
No.
(You can set it to 1us - yes, but you ask for "use" : so what you wanna "use" on a cpu, if your systick keeps cpu busy at almost 100% ?)
You can set any timer to output a 1us PWM , no problem, but to do anything (like INT) at this rate is bad idea.
2024-06-22 05:23 AM
I want to use 1uS systick timer for scheduler. Basically I want to do this without interrupt.
Regards,
Sachin N
2024-06-22 06:08 AM - edited 2024-06-22 06:09 AM
Oh, then try it.
Just - whats your core clock ? 48M ? So about 30...48 instructions can your cpu do here, but :
how much time you need to switch tasks ? 12 clk for registers, then save task stack, and then have maybe 20 instructions , until next task switch comes....
and how switching comes, without INT ? polling ????
and what you expect to do with this then ? (Most time the cpu now busy with task switching, not much time for any program left.
2024-06-22 06:23 AM
You really should talk to each other...
uint16_t start = TIM3->CNT; // Say 10 MHz count
while((TIM3->CNT - start) < 10); // Wait ~1 us