Altera_Forum
Honored Contributor
13 years agoUsing Scaler II with NIOS II
Hello,
I've got problem using the Scaler II from the vip suite with Nios II. It seems that my attempt to write to the scaler's register fail everytime I try. Once the megacore is stopped, I send new values to registers with this function : alt_u32 ALT_VIP_SCALER_II_WRDATA(alt_u32 vipBaseAddress, alt_u32 reg, alt_u32 w_param){ alt_u32 watchdog = 0x00; alt_u32 r_param ; do{ watchdog++; IOWR(vipBaseAddress, reg, w_param); r_param = IORD(vipBaseAddress, reg); } while( (r_param != w_param) && (watchdog != TIMEOUT) ); return (watchdog == TIMEOUT)?1:0; } When I try to read the new value I always get 0x0000. What am I doing wrong? Thx, Lionel.