Forum Discussion
Altera_Forum
Honored Contributor
13 years agoI don't know the timing of your signals, but if you are really getting data when it is changing, I think you should read it after the second while loop or maybe read after a short delay.
If you can change the 'hardware' part (I mean fpga design) besides Nios software, I suggest you add a bit of glue logic in order to latch your pio data when the strobe signal becomes active. In other words you make the same as those while loops but in a more efficient and stable way, at the expense of using a few more fpga resources.