We have tried your solution unfortunately it’s the same problem. Only one timer works and we can’t read the period programmed and the snapshot value. Both interval timer are declared as custom timer on SOPC Builder.
Here the code for the 500ms timer (same code for 250ms) :
// declaration of the 500ms timer IOWR_ALTERA_AVALON_TIMER_CONTROL(TIMER_500M_IRQ, 0);
IOWR_ALTERA_AVALON_TIMER_PERIODL(TIMER_500M_IRQ, 0x9680);
IOWR_ALTERA_AVALON_TIMER_PERIODH(TIMER_500M_IRQ, 0x0098);
alt_irq_register( TIMER_500M_IRQ, NULL, TIMER500M_IRQ);
IOWR_ALTERA_AVALON_TIMER_CONTROL(TIMER_500M_IRQ, ALTERA_AVALON_TIMER_CONTROL_CONT_MSK | ALTERA_AVALON_TIMER_CONTROL_START_MSK | ALTERA_AVALON_TIMER_CONTROL_ITO_MSK);
// reading with the snapshot IOWR_ALTERA_AVALON_TIMER_SNAPL(TIMER_500M_IRQ, 0x00);
periodl=IORD_ALTERA_AVALON_TIMER_SNAPL(TIMER_500M_IRQ);
periodh=IORD_ALTERA_AVALON_TIMER_SNAPH(TIMER_500M_IRQ);
Do you have a code example ?
Thanks