2010-11-06 20:12:45 Mapping ISR on timer
shuja ahmed (UNITED KINGDOM)
I am using BF537. I want to map an ISR on gptimer and wanted this ISR to execute after every 20 millisecond.
I have enable bfin_simple_timer API but after this API I am able to execute the following code
tmr5 = open("/dev/timer5", O_RDWR);
ioctl(tmr5, BFIN_SIMPLE_TIMER_SET_PERIOD, 1000); // For a moment, just writing something on period register
ioctl(tmr5, BFIN_SIMPLE_TIMER_SET_WIDTH, 10); //
But, I dont know how to map an ISR. I wanted timer to count upto predefined programmed value and then call an ISR.
After going through the forum, I think that I can use "peripheral_request(P_TMR5, "/dev/timer");" function and for this I have to include the following files,
But if I try to compile code with these files included, I get an error that files not found. I am new to Makefile and dont know how to give a path to these files.
If there is some other way of mapping ISR to timer output, please tell me.
2010-11-07 22:06:41 Re: Mapping ISR on timer
Aaron Wu (CHINA)
this is somewhat the same with your another post, could you download a default linux distribution and tool chain to build and see if this error happens?
2010-11-07 23:18:39 Re: Mapping ISR on timer
Sonic Zhang (CHINA)
You can not call kernel space API peripheral_request(). If you want to get notified via bfin_simple_timer driver in user space, you have to enhance the driver to support at least poll operation and make the application wait in poll.