RTC with TQM823L

Jaap-Jan Boor jjboor at aimsys.nl
Thu Mar 17 19:23:02 EST 2005


Can't you use a cpmtimer to fire every 10ms and wakeup a
high priority thread?

Jaap-Jan

On 17-mrt-05, at 8:47, Jean Nicollerat MD wrote:

> Hello,
> I need to have an interrup every 10ms in my application running in 
> linux.
> I have a PowerPC 823 on the board TQM823L LCD from denx.
> I use the ocan driver.
> I try to use the RTC modules but with the code :
>
> 	fd = open ("/dev/rtc", O_RDONLY);
>
> 	if (fd ==  -1) {
> 		perror("/dev/rtc");
> 	}
> 	/* Turn on update interrupts (one per second) */
>
> 	retval = ioctl(fd, RTC_UIE_ON, 0);
> 	if (retval == -1) {
> 		perror("ioctl");
> 		//exit(errno);
> 	}
>
> I get an error message :
>   ioctl : invalide argument # for then line :"retval = ioctl(fd, 
> RTC_UIE_ON,
> 0);"
>
> Can somebody help ? why it is not working or a better way to get 
> function
> called each 10ms
>
> Thanks
>
> Jean
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded




More information about the Linuxppc-embedded mailing list