Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

a weird issue with wrctl instruction

Altera_Forum
Honored Contributor II
1,021 Views

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
0 Kudos
0 Replies
Reply