Hi,

I'm trying to configure a PWM-pin on the raspberry pi 2. I'm using pigpio, with the demo-program.
I configured pin 12 (GPIO 18) to be a PWM pin.
When I click the PWM-button on the demo-program, the pi hangs. I have to power-cycle to "recover".
I modified this:
  REG_GPIO = $3F000;
and this :
fd := fpopen('/dev/gpiomem', O_RdWr or O_Sync); // Open the master /dev/memory device

I'm trying to debug this :
      delayNanoseconds(200); <-- breakpoint
      pwmf := Pointer(LongWord(Self.FPwm)+PWM0_RANGE);
      pwmf^ := $400 ;                             //max: 1023
      delayNanoseconds(200);
      pwmf := Pointer(LongWord(Self.FPwm)+PWM1_RANGE);
      pwmf^ := $400 ;                             //max: 1023
      delayNanoseconds(200);
Stepping further with F8.
When I press F8 on the first
      pwmf^ := $400;
the code "singe steps" automatically, but after a number of steps the application crashes and the pi hangs. This is different from normally running the application where the application just hangs after pressing the PWM-button.

Input and output works fine, as user "pi".

Any thoughts ?

Thanks,

Koenraad.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to