NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
STM Linux Device Driver
Contents
Linux Device Driver for STM[edit]
- Linux kernel module device driver enables applications to use MIPI STM as a standard character device driver.
- No modifications to application code.
- No hardware knowledge needed: just use it like a standard device
- i.e. “cat file.txt > /dev/stm1”
- Device is accessed through standard Linux file system node – i.e. /dev/*
- Linux device driver supports:
- Configuration for MIPI STM base address and resolution
- 255 STM channels (0 – 254)
- Multiple STM channels are accessible simultaneously from software
- Device accessed as a stream of bytes
- Driver is a kernel module (i.e. outside of the kernel binary)
- Loadable device module (added/removed at runtime).
- Binary and source code provided for re-build (if needed)
How to build and run the STM Linux driver for Android on Blaze[edit]
- To build for Android (2.6.32) kernel:
- Follow the steps in the README.txt file to build the kernel module.
- To install the kernel module on the Blaze board running Android:
- You need to first install the busybox command line tools. See this article.
- Following the instructions in the README.txt on how to install the kernel module.
Demo[edit]
- Video demo for loading and capturing STM contents:STM Linux Driver Video
Note: You would need Adobe Shockwave player/plugin to play this video.
Example Use[edit]
- The data contents can be re-directed to STM channel, e.g.,
/home/usr1>ls -l > /dev/stm1
- Alternatively, the application can open a handle to the device for better control of data flow over specific STM channels, e.g.
fd1 = open("/dev/stm1", O_WRONLY); /* STM channel 1 for thread1 */ /* in thread1, send data over dedicated channel */ strcpy(data1, "From STM test application – thread1.\n"); rtn = write(fd1, data1, strlen(data1));
Status and Download[edit]
- STM Linux driver source and module files.GForge
- Note: The attached driver module is built from kernel version: Linux-2.6.33-rc2. Please rebuild the STM driver module for any other versions.
Hints and Tips[edit]
- If you notice that there are some messages missing, please check your memory settings for STM port (for example, for Omap4430, it is start at 0x54000000).
- Please disable cache and buffering for STM port in Linux.