Forum Discussion
Altera_Forum
Honored Contributor
12 years agoInterval timer problem
Hello. I’ve got a problem with simple interrupt from interval timer in uC/OS-II System frequency is 75Mhz. There are PIO and timer. It makes strobe. Duration 10 ms. Here it is:
// glob...
Altera_Forum
Honored Contributor
12 years agoI don't need board to boot in less than 10 ms. My board starts for a long time. And that is all right.
I need to do something like this:https://www.alteraforum.com/forum/attachment.php?attachmentid=7682 t1 - is first strobe with a duration 10ms, t2 - time to reinit and restart timer. To make stobe with duration 10ms I first init and start timer, and then set pioout1 up But I can't make t2=0, becausevoid timer_start(void)
{
IOWR_ALTERA_AVALON_TIMER_CONTROL(timer_base, ALTERA_AVALON_TIMER_CONTROL_STOP_MSK); //stop timer, disable interrupt
IOWR_ALTERA_AVALON_TIMER_STATUS(timer_base, 0); //clear flag
IOWR_ALTERA_AVALON_TIMER_CONTROL(timer_base, ( ALTERA_AVALON_TIMER_CONTROL_ITO_MSK |
ALTERA_AVALON_TIMER_CONTROL_START_MSK)); //start timer, enable interrupt
return;
} takes 6ms! I can set timer for 4ms it can help me get second strobe with 10ms duration, but it is dirty hack. maybe there is some optimization, and i should turn it on in bsp/hal configuration?