Jump to ID:
Core Development Tools

Project Home

Documents

Source Code

Discussions

Wiki

Project Info
Forum Topic - problem with read/write registers (cpld) on i.mx31: Page 1 of 2 (2 Items)
   
 
 
problem with read/write registers (cpld) on i.mx31  
hi,

i have a problem with reading/writing from/to the CPLD registers:
my code looks like this:

#include <stdlib.h>
#include <stdio.h>
#include <arm/inout.h>

typedef unsigned short uint16;
const uint16* BSTAT1 = (uint16*) 0xb4000014;

int main(int argc, char *argv[]) {
 	uint16 reg = in16( 0xb4000014);
 	printf("0x%04x\n", reg);
	return EXIT_SUCCESS;
}

while running i gdb terminated with:
<terminated>cpld_test [C/C++ QNX QConn (IP)]	
	<terminated>QNX GDB Debugger (16.05.08 14:08)	
	<terminated, exit value: 1>/tmp/cpld_test_ ... on mx31_ pid 110600
	<terminated, exit value: 0>C:\QNX632\host\win32\x86\usr\bin\ntoarm-gdb.exe

i tried to include the QNXBSP/src/hardware/devg/imx31/imx31.h, too. (i'm using an freescale i.mx31 board) But that 
doesn't help.

maybe there is a memory mapping? but how i get the mapped addresses?
or am i in principle wrong?