QNX 7.0 Beaglebone Black PRU-ICSS memory access

Hi

I installed QNX 7.0 on my Beaglebone Black. Now I need to get access to PRU-ICSS memory. ARM Cortex-A8 Memory Map says that PRU-ICSS memory starts at 0x4a300000 and ends at 0x4a37FFFF (512KB). Mapping this memory causes no errors:

void* pruss_memory = mmap_device_memory(NULL, 0x80000, PROT_READ|PROT_WRITE, 0, 0x4a300000); if ( pruss_memory == MAP_FAILED ) { perror( "mmap_device_memory failed" ); exit( EXIT_FAILURE ); }

However when I try to read or write to this memory I get this error:

Process 81942 (LedyTest) terminated SIGBUS code=2 fltno=40 ip=100c8f9a(/tmp/LedyTest@_btext+0x000001fe) mapaddr=00000f9a. ref=28000000

Does anyone know how to solve this problem?

Thanks in advance

Is the PRU-ICSS subsystem initialised in your BSP ?

I didn’t know that PRU-ICSS has to be initialized. How should I check it ???
Thanks for reply

I have no knowledge of PRU-ICSS but this kind of IP need some initialisation : Enable, clock selection…

Check out this package (you must be approved by TI to get it).

software-dl.ti.com/sitara_linux/ … x_FDS.html

This is essentially “bare-metal” C-code for initializing and sending programs to the PRU. Of course you must “map” all the memory addresses to use with QNX - the example C-code just directly writes to the physical addresses.

Thanks for reply! I will definitely check this out.