I am using Ubuntu 14.04 and the arm-linux-gnueabihf-gcc compiler to compile projects for the sama5d3 explained board and using minicom and zmodem to transfer the compiled source code from the ubuntu machine to the development board. The sama5 board comes with Poky, the yocto linux reference build. My end goal is to access and read registers for the ADC and SPI devices.
I've been giving the data sheet a good read here, on page 1664, it details the ADC Channel Status Register; at memory location 0xF8018018. Linux obviously provides a segmentation fault whenever i try to retrieve the value there. A detailed tutorial on how to use mmap for memory mapped IO would also be cool as I've heard this may be an alternative.
The reason for this is so I can read the ADC at 100 ksamples / sec. Accessing memory addresses from user space probably isn't possible, if it is, it would be greatly appreciated to let me know how. If not, I'd like to know how I'd go about creating a bare-metal application that would allow me to do it. Atmel has a GNU software package that includes ADC drivers for the arm-none-eabi-gcc compiler. How would I go about setting this up to compile and run programs on this board?
To condense this all down:
A desktop running Ubuntu 14.04
the sama5d3-xplained development board
The questions are:
Is there anyway possible to access the ADC at speeds >= 100 ksamples/sec
Is there anyway to access the registers from a memory location (like the ADC channel status register at memory location 0xF8018018) from user space?
How would I go about developing a bare-metal application if the answer to the question above is no.
Thank you for your help and time.