Not sure how to work with scratchpad with PRU for beaglebone ai

,

I have tried to communicate between the PRU using scratchpad. I have a beaglebone ai (the am5729 sitara one). I followed this

Not sure how to proceed, any idea?

Here is the link to the code