Paul Swirhun added the comment:
A workaround is using memoryview (as reported here:
https://stackoverflow.com/questions/53492716/python-writing-to-memory-in-a-single-operation).
This results in only 1 transaction on the bus for some reason.
import os, mmap
fd = os.open("/dev/mem",
New submission from Paul Swirhun :
mmap (example, as used in python-periphery) duplicates writes, compared to
devmem and a c-periphery on an ARM64 platform (Zynq/Petalinux/Yocto). There are
various other reports of duplicated writes using mmap suggesting it is a bug.
Example:
fd = os.open