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.

edge capture

Altera_Forum
Honored Contributor II
1,214 Views

The following piece of code should react to the falling edge of a 1-bit input pio and count the falling edges of a signal. 

 

settings: no interrupt 

synchronous capture 

falling edge 

 

After one falling edge the loop is continously run. 

 

With a DSO it was detected that edge capture register was not cleared. How does one reset edge capture register properly? Where is my mistake? 

 

Thanks in advance. 

 

andy 

------ 

 

while(counter<=end) 

 

while(edge_capture==0) 

edge_capture=IORD_ALTERA_AVALON_PIO_EDGE_CAP(BASE); 

 

edge_capture=0; 

IOWR_ALTERA_AVALON_PIO_EDGE_CAP(BASE,0x0);  

 

counter++ 

 

---
0 Kudos
0 Replies
Reply