Open source minimal stack for the ch32 line of WCH processors, including the ch32v003, a 10¢ 48 MHz RISC-V Microcontroller - as well as many other chips within the ch32v/x line.
DelaySysTick has jitter for specific values of 1, 2, 6, 8, 10 (tested up to 10).
DelaySysTick(0) is always 292ns.
DelaySysTick(1) is 292ns or 459ns.
DelaySysTick(2) is 459ns or 626ns.
DelaySysTick(3) is always 793ns.
I'm suspecting compiler optimization at play here. I tried forcing it to be inlined with little success.
Adding volatile changed the behaviour (2 doesn't have jitter anymore) but it still shows jitter for other values. It's also much slower, obviously...
DelaySysTick has jitter for specific values of 1, 2, 6, 8, 10 (tested up to 10). DelaySysTick(0) is always 292ns. DelaySysTick(1) is 292ns or 459ns. DelaySysTick(2) is 459ns or 626ns. DelaySysTick(3) is always 793ns.
I'm suspecting compiler optimization at play here. I tried forcing it to be inlined with little success.
Adding volatile changed the behaviour (2 doesn't have jitter anymore) but it still shows jitter for other values. It's also much slower, obviously...