Closed BhuvaHiren closed 5 years ago
To rule out design/clocking issue, can you run simple blinky example and confirm its frequency is as expected?
Hi AntonKrug,
Thanks for reply, As you said, I tried miv-rv32im-systick-blinky example with same frequency and it is working as expected. but, when i try same using freeRTOS it is taking more time which is 100 times then the actual.
Thanks BhuvaHiren, There is a bug in the port.c. Need to consider the hardware pre-scalar in the port.c. Below lines in port.c time += (configCPU_CLOCK_HZ / configTICK_RATE_HZ); should be replaced with time += (configCPU_CLOCK_HZ / (configTICK_RATE_HZ *100) );
This would give you the correct time. Will update the source code soon.
Regards, Nitin
Hi Nitin,
Thanks for the solution. want to know is this RTC_PRESCALER macro?
Yes, It is.
okay
I am using 50Mhz as the configCPU_CLOCK_HZ and for configTICK_RATE_HZ i am using 100Hz but for this configurations also it takes 10 sec to timeout for a 100 tick timer