Forum Discussion
Altera_Forum
Honored Contributor
21 years agoThe one thing which occurs to me is that your code won't work on processors with a cache. You need to use the STBIO instruction instead.
And you should probably use builtin_stbio instead of using inline assembler because the compiler can optimise it much better (or use the HAL macro IOWR_NATIVE8 or something like that which does the same thing). I assume you've checked your objdump file to make sure the compiler hasn't split up your assembler statements (which is will sometimes do to make optimisation better).