Squidge
Certified Guru
I don't see whats wrong with the Linux function gettimeofday() which can give you accuracy down to 1 μsec / 1 Mhz, but also gives seconds since epoch if you want something a bit slower.
Squidge said:I don't see whats wrong with the Linux function gettimeofday() which can give you accuracy down to 1 μsec / 1 Mhz, but also gives seconds since epoch if you want something a bit slower.
See post #6 of this thread.Squidge said:I don't see whats wrong with the Linux function gettimeofday() which can give you accuracy down to 1 μsec / 1 Mhz
Ah right, I see. Sounds like yet another GPH fubar.notaz said:See post #6 of this thread.
Exophase said:Hey Pickle. Do you have the Pollux manual? I could send it to you if you don't. It'll explain how to use the timers.
Exophase said:That's odd, I should have room there. I cleared some more, so you might want to try again. I'm not really on IRC very much now and you always seemed to miss me before so that might not work. If I don't hear from you I'll PM you my e-mail address.
Pickle said:Exophase said:That's odd, I should have room there. I cleared some more, so you might want to try again. I'm not really on IRC very much now and you always seemed to miss me before so that might not work. If I don't hear from you I'll PM you my e-mail address.
dont worry about it ;-)
satacoy said:Did anyone ever figure out how to get a reliable clock down to the millisecond (or better) range? I'd like to calculate how many milliseconds have passed since the last frame, the libcastor lc_gettime() function doesn't appear to be nearly accurate enough.
Pickle said:satacoy said:Did anyone ever figure out how to get a reliable clock down to the millisecond (or better) range? I'd like to calculate how many milliseconds have passed since the last frame, the libcastor lc_gettime() function doesn't appear to be nearly accurate enough.
yeah dont use lc_gettime, like it was said that is for RTC timing.
Im looking into using some timer hw directly and add it to libcastor.
crow_riot said:Pickle said:satacoy said:Did anyone ever figure out how to get a reliable clock down to the millisecond (or better) range? I'd like to calculate how many milliseconds have passed since the last frame, the libcastor lc_gettime() function doesn't appear to be nearly accurate enough.
yeah dont use lc_gettime, like it was said that is for RTC timing.
Im looking into using some timer hw directly and add it to libcastor.
is there any progression/update on this ? ...
if not, may someone send me that pollux manual?
I got as far as to read the active timer, but setting the others hasnt worked. Ive put on the side for now, ive lost interest for now
crow_riot said:I got as far as to read the active timer, but setting the others hasnt worked. Ive put on the side for now, ive lost interest for now
hm no good news then... i'll try to do my best and get my fingers dirty finding a solution. did exophase (?) send u the pollux manual? would be nice to share if you are allowed to ...
pseudonym404 said:I'd love a copy of any documentation going too if it's OK to distribute it. OLED controller and NAND datasheets were easy enough to find, but I can't find any SoC docs.
Orkie said:MES won't give you one anyway. They do hand them out in exchange for large sums of money, but they even only do that under NDA.
#define TIMER_BASE3 0x1980
#define TIMER_REG(x) memregl[(TIMER_BASE3 + x) >> 2]
void ptimer_init(void)
{
TIMER_REG(0x44) = 0x922;
TIMER_REG(0x40) = 0x0c;
TIMER_REG(0x08) = 0x6b;
}
unsigned int ptimer_get_ticks_us(void)
{
TIMER_REG(0x08) = 0x4b; /* run timer, latch value */
return TIMER_REG(0);
}
void ptimer_cleanup(void)
{
TIMER_REG(0x40) = 0x0c;
TIMER_REG(0x08) = 0x23;
TIMER_REG(0x00) = 0;
TIMER_REG(0x40) = 0;
TIMER_REG(0x44) = 0;
}
volatile unsigned int *memregl;
int memdev = open("/dev/mem", O_RDWR);
memregl = mmap(0, 0x20000, PROT_READ|PROT_WRITE, MAP_SHARED, memdev, 0xc0000000);