STM Linux Device Driver
From Texas Instruments Embedded Processors Wiki
Translate this page to
Contents |
Linux Device Driver for STM
- 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
- 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
- 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
- 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
- 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
- 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.
