Jonny_A wrote:Dear Joan,
I also use Servoblaster for my current project, do you have any hints what has to be changed besides the base adress to get it running on the pi 2?
I had a look at your library and it looks quite good and flexible, if I can't find a solution, I might change to using this. However it would be quite some work to port the program...
1. The peripheral base address from 0x20000000 to 0x3F000000
2. The bus offset from 0x40000000 to 0xC0000000
3. Removing the bus offset addition to the mmap call
Those are the changes I (think I) made in the servod.c code earlier in the thread.
In addition you need to find some way to ensure that the initialised DMA control blocks are flushed through the caches to actually end up in physical memory. I do that by repeatedly allocating large memory chunks, initialising them with any old values (to make sure the memory is actually allocated) and then freeing the allocated memory. In pigpio this allocation, set, free loop is repeated for something like 10 milliseconds during initialisation.