This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Hardware access from linux

Other Parts Discussed in Thread: AM1808, OMAPL138

Hi,

 

I have a MityDSP-L138 board and right now I'm using the AM1808 in the OMAP. It currently boots using U-Boot bootload and uses a Linux davinci kernel. It's the first time I mix high level OS with microcontroller stuff and I have some questions regarding hardware access.

First, from what I've read, accessing SPI/UARTS or other communication peripherals needs to go through a kernel driver. Where can I confirm if a driver exists  for the SPI on the AM1808/OMAPL138? 

Second, if I want to use the hardware timers to have a some work done each 20uS, is it possible in Linux and if yes, what are the best ways? Kernel driver? 

Third, how do I access GPIOs?

Fourth, I know linux isn't a RTOS but is it still possible to do time critical computations? Is there a big overhead using the peripherals and GPIOs of the chip from Linux?

Fifth, or maybe it should have been the first :), is there a generic getting started documentation about programming/using an ARM chip and its peripherals from Linux

 

Thank you very much!

  • I'm working with the OMAPL137 EVM and I'm also interested in the answer to these questions as I'm reaching the point where I need to access hardware devices from the ARM/Linux side of the part.  Where does a newbie to Linux on the TI parts get started with interacting with the drivers and hardware?

    Thanks

  • Yha, I wrote my own SPI driver in bare metal, and it took a few hours from scratch, and it ran fast. (good documentation on the SPI part)  But, I have yet to get anything to work in Linux.  What's the chances of just mmap'ing the entire chip, and running the spi that way?  When I tried it, with my bare metal code, the spi was very unstable, and a 1000x slower (due to instability).

    I'm also fighting the USB.  I just want to send a few bytes from my Linux host, to the microcontroller, and get a few bytes back.  But, really quick, low latency turnaround.  So far the gadget serial stuff seems slow.  And, there's almost no info (or way too many fragments of info) on how to get good performance out of Linux USB.  Of course, the bare metal USB isn't done for the AM1808.