Forum Discussion
Altera_Forum
Honored Contributor
20 years agonp_timersnapl doesn't change
Hi Friends! I use the following program: #include <stdio.h># include "nios2_system.h"
int main (int argc, char* argv)
{
np_timer* timer0=((np_timer*) na_high_res_timer);
float r=0;
...
Altera_Forum
Honored Contributor
20 years agoI think it is not an cache problem. I assume he uses the peripheral adress which is defined in the nios2_system.h, so the peripheral access with such a structure will bypass data cache.
Anyway, i would avoid accessing the peripheral with structure. just do it in the good old classic way: use outl and inl. so far i haven't tried your code...