Acces NS9210 registers from user program


I need to acces the NS9210 Special Function Registers like the SPI configuration register.
I’m however new to linux and can seem to find a way to access this register directly from my c program.

Does anyone know how to do this?

Thanks in advance,

You cannot access memory or memory mapped registers from Linux user space directly.
In general you should write a kernel module to access physical memory and ASIC registers,
the module will look like this (just found on google, can’t guarantee it will work):

but as an alternative take a look at example:
This example shows how to access real memory/registers from user space in a more simple way and it was tested to work on DEL.


the memwatch demo from the cd was what i was looking for

Seems like i’m not there jet…
I was able to read/write the registers, but when i tried to write to the SPI Control registers (0x9003_1000 - 0x9003_7FFF), they didn’t change.
I’ve been searching for a while now what may be the cause of this problem, but so far i stil can’t write the SPI control register.

Thanks in advance,

Are you able to write/read other registers? Perhaps SPI has to be enabled somewhre in like master reset regeter or master clock register or both…

thanks for the reply, you were right: if we enable the spi master driver we can write to the spi registers and change the settings for spi slave.