> When I tried to use RTOS it appeared to be that better than 1ms resolution was not remotely possible.I've only worked with one RTOS, and a lightweight one at that.
The scheduler would run every time an interrupt handler finished running.
One such interrupt was the 'systick' - you can choose if you want it to run every 1ms, or 100us, or a different rate (depending on how fast your CPU is)
The systick was how you timed anything you didn't want to use a dedicated hardware timer for. If you want to wait 10ms and your systick happened every 1ms, you waited until the 10th systick.
If you want to time something with finer resolution than 1ms, you either made your systick faster, or used a hardware timer with the interrupt triggering the scheduler.
> Just hardcoding the interrupts resulted in 1us resolution easily.
If your CPU runs at 180MHz, 1us is enough time for 180 clock cycles. Plenty of time to run one reasonably carefully coded interrupt handler, not much time to run 10 interrupt handlers.
As you can imagine, running your systick at 1us with that clock rate would be challenging!