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

From Texas Instruments Wiki
Jump to: navigation, search

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]

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.
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article STM Linux Device Driver here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article STM Linux Device Driver here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article STM Linux Device Driver here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article STM Linux Device Driver here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article STM Linux Device Driver here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article STM Linux Device Driver here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article STM Linux Device Driver here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article STM Linux Device Driver here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article STM Linux Device Driver here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity