Solved

Write into an internal register on ADS target

Posted on 2004-10-10
1
178 Views
Last Modified: 2010-04-22
Hello,

Genaral:
I'm working with Montavista Linux 3.1 Embedded Development Kit( pro ) on Motorola M9328MXLADS Evaluation Board( has i.MX1 DragonBall Application Processor on it ).
I'm using NFS Cross Compile.

Problem Description:
When I'm trying to debug my code( via Telnet ) the following announcement appears:
"Segmantation problem".

My code:
#define DDIR_A       (*(volatile unsigned int *)(0x0021C000) // Absulote address
DDIR_A = 0x00000004;                                      // Output signal

Could someone help me? I have heard on "mmap" fuction, is it could be helpful?
Thanks.
0
Comment
Question by:nirbena
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
dimitry earned 500 total points
ID: 12272654
From application you need to do something like this:
int fd;
volatile unsigned long *ddir_a;

fd = open("/dev/mem", O_RDWR | O_SYNC);
ddir_a = (volatile unsigned long *)mmap(0,0x1000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x0021C000);

*ddir_a = 0x00000004;

munmap((void *)ddir_a, 0x1000);
close(fd);
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question