NANDflash driver crash with the information of "Memory

Hi,Everyone!

I have some problem with my NANDflash driver. After command
fs_etfs_sam9261s, then it crashes offering information:

Process 53254 (fs_etfs_sam9261s) terminated SIGSEGV code=1 fltno=11 ip=0010205c ref=01800c34
Memory fault

The question is what these messages of fs_etfs_sam9261s crash mean?
I locate the position of crash where i use a out32(……). The address used in out32() is mapped at another place. In NANDflash driver i set ThreadCtl(_NTO_TCTL_IO, 0), but nothing changed. Now i don’t know what the problem of the NANDflash driver, can anybody tell me something, Thank you in advence!

Are you sure the TheadCtl is done at the right place.

But where is right place of TheadCtl, i put it at the the first place of main().

Can you post the code with the ThreadCtl().

On what processor is this?

Processor: Atmel sam9261s (arm926ejs)
QNX:6.2.1

I write another programme mapped device registers which are mapped in startup’s interrupt callout. It crash when it read or write values of mapped register .

[code]:
#define SAM9261S_PIOC_BASE 0xfffff800ULL
int main()
{
uintptr_t handle;
volatile uint32_t inhalt;

if(ThreadCtl(_NTO_TCTL_IO, 0) == -1) 
{ 
	printf("%s", strerror(errno)); 
	exit(-1); 
} 

handle = mmap_device_io(0x40,SAM9261S_PIOC_BASE);
printf("%s\n", strerror(errno));
printf("mapped addr:%x\n",handle);

inhalt=in32(handle + 0x08);
printf("%X\n",inhalt);
return 0; 

}

[output information]:
No error
mapped addr:1800800
Process 16392 (io) terminated SIGSEGV code=1 fltno=11 ip=00100650 ref=01800808
Memory fault

I don’t know what’s wrong with it.