Hi Jiawei Wang

I have a similar requirement. The solution with SysTick and a little tick in configuration used through semaphores, doesn't solve the problem in a good way: shorter sampling times (<500us) are difficult to obtain, in particular in pysimCoder generated code. This is my experience, but I'm still waiting for a better solution.

Bye

Roberto


On 1/13/25 2:57 PM, Jiawei Wang wrote:
Hello everyone,

I am currently developing on an STM32H7 board using NuttX and am in need of a 
high-resolution timer to profile my program.

A timer with microsecond resolution would suffice.

My initial approach was to utilize one of STM32's timers configured in 1MHz 
auto-reload counter mode, and then combine the counter register value with the 
SysTick value to derive a time measurement. However, this method feels somewhat 
hacky and bypasses the OS's abstraction layer, which I prefer to maintain.

As I am relatively new to NuttX, I am unsure of the conventional method within 
NuttX to achieve this functionality and have not found relevant examples. Any 
guidance or pointers would be appreciated.

Thank you,

Jiawei Wang <m...@jwang.link>

Reply via email to