In32() and out32() functions

Iam accessing MCAN2 registers of dra829v

u_intptrt addrbase;
addrbase = mmap_device_io(0x10000, mcan2baseaddr)

in32(addrbase + 0x1000 + 0x18)
in this case it is going to in function and connection to target is going down

out32(addrbase + 0x1000 + 0x18)
in this case, it is causing bus error

I tried ThreadCtl() function in main
but no use

please help me if you know

Have you done this in your program?

On x86 and x86_64 targets, the process must have the PROCMGR_AID_IO ability enabled, and the calling thread must have I/O privileges, or else it will fault with a SIGSEGV; see procmgr_ability(), and the ThreadCtl() _NTO_TCTL_IO command.

The SIGSEGV would explain the ‘target going down’ on your in32() call.

It would help if you posted some sample code of everything you are doing related to this effort so we can see what’s going on better.

Tim

Iam running it on aarch64 le

And working for mcan13, mcan9, mcan5 in the same way