2

Context: I'm working with a board (Intel NUC DE3815TYBE) that has an Intel Atom E3815 Processor. The processor has two PWM pins which I'd like to use to control fans - these pins are accessible via a header on the board, but there is no documentation for how to use them in software. However, the documentation for the processor details the on-chip registers used to control those PWM pins - lists their memory addresses. Here are two snapshots from the processor datasheet:

enter image description here enter image description here

Say I'm working under a Linux or Windows operating system. If I'm writing a C program and would like to read/write to these I/O registers (which are inside the processor chip), how would I go about doing that?

Can I just do a normal C memory access, like this?

int x = *(0x00002e23)

Or will that not work since this register is internal to the CPU chip and not in RAM? It says they are "memory-mapped" I/O registers but I'm not exactly sure what that entails. Is there something special I have to do to access these?

GordonFreeman
  • 68
  • 1
  • 6
  • It might be worth taking a look at `/proc/iomem`, `/proc/ioports`, *et al*. – Paul R Dec 17 '15 at 15:35
  • No, you can't. The reason is virtual memory. http://stackoverflow.com/questions/15615229/accessing-hardware-registers-in-linux-userspace – Oleksandr Kravchuk Dec 17 '15 at 16:03
  • These are peripheral module registers, not "internal CPU" registers. Your title and text are missleading. Please read about the difference between CPU (i.e. Processor) and on-chip _peripheral_ modules. – too honest for this site Dec 17 '15 at 16:44
  • Olaf - Thank you, just updated the title to avoid confusion. Yes, I'm talking about registers that are inside the chip but not inside the CPU (the register map diagram shows it). But typically the entire chip is referred to as the CPU so that's why I worded it like that. – GordonFreeman Dec 17 '15 at 16:56

0 Answers0