Hot answers tagged

3

From the status as shown everything seems OK so far. It shows that the program has run and finished successfully with code=exited, status=0/SUCCESS. No problems seen by systemd. I did not understand the program at a glance, and didn't take the effort to analyze it. Does this program has some exit points in case of an error? If so, then exit there with exit ...


1

You are on the right track, but if you are using the pi4 it has a different peripheral base address which for the pi 4 is 0xFE000000. You also seem to forget to map the clock register, check your gpioInitilise() inside you will see gpioReg = initMapMem(fd, GPIO_BASE, GPIO_LEN); systReg = initMapMem(fd, SYST_BASE, SYST_LEN); bscsReg = initMapMem(fd, ...


1

I would start by finding or making a tool which lets you read and write system memory from the command line, such as busybox devmem. Then you could experiment without re-compiling your program every time, and see the outcome of each step in isolation. Start by trying out: sudo apt-get install busybox sudo busybox devmem 0xFE000000 If that doesn't work, I'd ...


1

I have some code to set the clocks here. It will need modifications for recent model Pi's to account for the new peripheral base addresses. However it will show you what you need to know.


1

I believe the methods presented in those examples are still relevant. libgpiod is the replacement for the sysfs method of directly talking to the GPIO as a Linux user. I.e. it replaces user functions to read and write individual GPIO and to be told about individual GPIO level changes. It is not a replacement for all the kernel modules which currently talk ...


Only top voted, non community-wiki answers of a minimum length are eligible