no PWM on MEGA2560 timer 2...with PWM.h v5..since arduino 1.6.0

hello,
after installing new ide arduino software....all versions since 1.60...up to 1.6.9 are not working ....on timer 2 ...Pin 9 ...on mega 2560....could anybody help me

pinMode(9,OUTPUT);
InitTimersSafe();
SetPinFrequencySafe(9,10000);
pwmWrite(9,127);

same PWM.h lib on lower arduino versions 1.0.5-r2 working

:confused:

the library you depend on is from 2012... might not be very current.

I usually mess around with timer registers manually to get to what I want.

http://playground.arduino.cc/Main/TimerPWMCheatsheet

yes different timers are not working anymore with the latest pwm library

...so i added the biult in timerone and timerthree lib.that works after installing
..timer4 and timer5..latest versions from internet...they are working

.for timer2 i use the tone funktion....

but you have to check the libraries with an editor ..to see if your board is included otherwise you get now freq and pwm ...without any error messages cause its written with #ifdef