Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

a weird issue with wrctl instruction

Hi all,

I encountered a weird issue that I enabled one PIO interrupt by using:

alt_irq_register(STROBE_PIO_IRQ, edge_capture_ptr, command_receive_interrupt);

STROBE_PIO_IRQ equals to 3

after calling alt_irq_register, the ienable register doesn't change its value to enable STROBE_PIO_IRQ.

So, I tried to find what was the problem, then I step into alt_irq_register routine, and found the problem, see the following assembly code:

wrctl ienable, r2

before excuting this instruction, I can see that the value stored in r2 register is 0x1f and ienable = 0x17, but after excuting this instruction the ienable remained the original value of 0x17.

It's a very weird problem, anyone help?

best regards,

David
No RepliesBe the first to reply