Kconfig 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. config RT_USING_CPUTIME
  2. bool "Enable CPU time for high resolution clock counter"
  3. default n
  4. help
  5. When enable this option, the BSP should provide a rt_clock_cputime_ops
  6. for CPU time by:
  7. const static struct rt_clock_cputime_ops _ops = {...};
  8. clock_cpu_setops(&_ops);
  9. Then user can use high resolution clock counter with:
  10. ts1 = clock_cpu_gettime();
  11. ts2 = clock_cpu_gettime();
  12. /* and get the ms of delta tick with API: */
  13. ms_tick = clock_cpu_millisecond(t2 - t1);
  14. us_tick = clock_cpu_microsecond(t2 - t1);
  15. if RT_USING_CPUTIME
  16. config RT_USING_CPUTIME_CORTEXM
  17. bool "Support Cortex-M CPU"
  18. default y
  19. depends on ARCH_ARM_CORTEX_M0 || ARCH_ARM_CORTEX_M3 || ARCH_ARM_CORTEX_M4 || ARCH_ARM_CORTEX_M7
  20. select PKG_USING_PERF_COUNTER
  21. config RT_USING_CPUTIME_RISCV
  22. bool "Use rdtime instructions for CPU time"
  23. default y
  24. depends on ARCH_RISCV64
  25. help
  26. Some RISCV64 MCU Use rdtime instructions read CPU time.
  27. config CPUTIME_TIMER_FREQ
  28. int "CPUTIME timer freq"
  29. default 0
  30. endif