Forum Discussion
Altera_Forum
Honored Contributor
9 years agoTake a close look at the documentation for mmap. It gives you a pointer to where in your address space it put the physical address you gave it. Say the offset to the register you are looking at is 4 from the start of your device. You need to use a pointer value that is value mmap gives you + 4. Beware of C pointer arithmetic as well. Print out the value returned by mmap and of your pointer and wait long enough for it to get to the screen before you access your device. Confirm that it is using the correct value.