Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

trouble using IOWR_32DIRECT and IOWR_8DIRECT in same code?

Guys

Im very new to nios and altera.

Im working on my first application using spi. that part works fine

What im having issues with is once i use IOWR_32DIRECT, later calls to IOWR_8DIRECT in same code seem to cause code to freeze.

I read in system console help that i need to respect memory boundaries, and i think im doing that.

If i write to IOWR_32DIRECT(0x00040010....), that works... 4 bytes

then if i write to IOWR_8DIRECT(0x00040014), i get errors. i would imagine that as long as i preserve the 4 byte boundaries, that id be able to write 8 bit words.... no?

Is there something that im doing wrong? Or is it once IOWR_32 is used, i can only IOWR/IOR_32... cant IOWR/IORD_8/16 anymore??

sorry if this is a "dumb" question. gotta learn somehow

thanks!!
No RepliesBe the first to reply