Read duty cycle of a pwm pin on Arduino Mega... ?!

Looking at the source of "analogWrite", it looks like it would be a little trickier than I had thought to do what you propose.
If the PWM value given is 0 or 255, then the timer registers are not written to at all, but instead a simple "digitalWrite" LOW or HIGH is performed.
Otherwise, retrieving the timer register contents is relatively simple, if a little tedious.

Best just remember the values you wrote. :wink: