Hi,
I would make some tests modifying the Montavista linux kernel tick rate from the default value of 100 to a value of eg 200.
Is it correct to manually modify the CONFIG_HZ=100 line on .config file?
Thx
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I would make some tests modifying the Montavista linux kernel tick rate from the default value of 100 to a value of eg 200.
Is it correct to manually modify the CONFIG_HZ=100 line on .config file?
Thx
I had similar problem when I wanted to put high performance timer in my driver code. The jiffies timer is not good enough. However, the clock source is configured for the 24MHz clock and you can get access to that timer. You need to call the correct functions to access the clocksource. If this interests you I can give you more detail....it was not very difficult.
Hi Bruce, it would be very useful for me, I am a Linux newbie.
Please let me know how to change the timer settings!
Thx
Hi Michele. I'm no expert either and there may be a better way to do this. There may be a more formal method but I could not figure it out. This worked for me and should for you as well.
#include <linux/time.h>
#include <linux/clocksource.h>
You just need to set this on initialization.
static struct clocksource *clock; /* pointer to current clocksource */
clock = clocksource_get_next();
The function bellow will return a 64-bit value in clock cycles.
cycle_t clock_ticks;
clock_ticks= clocksource_read(clock) & clock->mask;
This function will convert the clock cycles into nanoseconds.
Hope that helped. Let me know if you have any questions.
Good luck,
Bruce
s64 time_ns;
time_ns = cyc2ns(clock, clock_ticks);
Thx for the reply; I've already tried this way:
- edit the file /home/<useraccount>/workdir/lsp/ti-davinci/linux-2.6.18_pro500/arch/arm/Kconfig
- change the value of the define Config HZ
- rebuild the linux kernel
- it works fine!
best regards