Note on writing the registers of the Altera Interval Timer

Note on writing the registers of the Altera Interval Timer

by Leonardo Mussa -
Number of replies: 0

Hello everyone,

please note that if you want to write directly to the registers of the Altera Interval Timer, you MUST use the macro IOWR(base, offset, data) and NOT the followings IOWR_8DIRECT(), IOWR_16DIRECT() etc..

This is because the Altera Interval Timer uses "native address alignment" meaning that the width of data transfers has to be 32 bits in order to work properly. This is not very clearly explained in the documentation, where they suggest to use the provided MACROs instead.

If aou wat to make sure you understand how to use the IOWR() macro, you can have a look at the functions defined in "altera_avalon_timer_regs.h" to see how it is done in the official Altera macros.

I hope this helps

cheers