Newsletter

Linux utility to write/read OMAP35x memory mapped registers





DSP DesignLine


Question: Is there a Linux application utility that allows the user to write/read OMAP35x memory mapped registers? This is for an OMAP35x evaluation module (EVM) from Mistral that does not have a LSP directory. Do I need to supply kernel source dir?

Answer: Yes to both questions. Click here for utility. Below are the instructions:

1.Introduction: The purpose of this document is to explain how to use a /proc function to read and write to registers on processors based on DaVinci technology and/or OMAP processors. Here, commands issued on the host begin with host $ and commands issued on the target begin with target $.

2.Installing the code: Download the attached regrw.tar.gz to your working directory and extract the files. For example, if the download was saved to the directory /home/user/workdir/regrw, you would issue the following commands in a Linux prompt:

host $ cd /home/user/workdir/regrw
host $ tar -xzvf regrw.tar.gz

Next, modify the Makefile so that LSPDIR points to your LSP directory. For example, change:

LSPDIR= to LSPDIR= /home/user/workdir/lsp/ti-davinci

Now, compile the code:

host $ make

This will create a regwr.ko file that should be copied to that target's file system. For example:

host $ cp regrw.ko /home/user/target

3. Running the code: To run the code, on the target, move to the directory where you placed the regrw.ko file, and install it. For example, if the file was placed in the target's root directory:

target $ cd /
target $ insmod regrw.ko

Now you should be able to read and write to registers. To read from a register, issue a command of the form echo ADDR > /proc/regrw where ADDR is the hex address of the register to read. For example, to read from register 01c40000, issue the command:

target $ echo 01c40000 > /proc/regrw

To write to a register, issue a command of the form echo ADDR DATA > /proc/regw where ADDR is the hex address to write to, and DATA is the data to write to that register. For example, to write 00000000 to register 01c72784, issue the command:

target $ echo 01c72784 00000000 > /proc/regrw

When you are finished, remove the module:
target $ rmmod regrw

For follow up questions, go to TI's e2e Community.

 
Related Links:
  • How to write an algorithm for DSP video processing with TI's DM6446 EVM
  • More tips: Eliminate PRGB output noise on TI 'DM355 eval module






  • Related Content

    WEBINAR
    1. How to choose the right semiconductor solution for your flexible, low-power ultrasound system design

    TECH PAPER
    2. RapidIO Gen2 Technology

    TECH PAPER
    3. Exploring video compression challenges

    TECH PAPER
    4. Updated Starter Kit Speeds Video Development

     


     Featured Jobs
    SEL seeking Business Development Manager in Pullman, WA

    SEL seeking Integration / Automation Engineer in Charlotte, NC

    ESRI seeking Business Manager - Support Services in Redlands, CA

    Amcor PET Packaging seeking Facilities Engineer in Philadelphia, PA

    Mentor Graphics seeking Embedded SW Tele-Sales in San Jose, CA

    More jobs on EETimesCareers
     Sponsor
     CAREER CENTER
    Ready to take that job and shove it?
    SEARCH JOBS:

     SPONSOR

     RECENT JOB POSTINGS
    For more great jobs, career related news, features and services, please visit EETimes' Career Center.