Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

c code to write a register

Altera_Forum
Honored Contributor II
1,001 Views

hi,i had created a custom component "32-bit register" using sopc builder.I want to write a data into the register using NIOS-II SBT Eclipse.Can anyone tell me the entire c-code to perform writing of register using nios-ii sbt eclipse

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
244 Views

Something like that maybe? 

#include <system.h> # include <sys/alt_cache.h> unsigned int *my_register = alt_remap_uncached((void*)MY_REGISTER_BASE); *my_register = my_value OF course replace MY_REGISTER_BASE with the actual base address value defined in system.h
0 Kudos
Reply