I think the problem is your duty cycle and period are the same, so its trying to turn on and off at the same time, giving unpredictable results.
Doing it from the shell prompt I did:
echo -n "1" >export
echo -n "1" >enable
echo -n "1000000" >period
echo -n "500000" >duty cyle
This gave the expected results on my oscilloscope.
Some further information taken from the kernel.org PWM pages.
When a PWM channel is exported a pwmX directory will be created in the
pwmchipN directory it is associated with, where X is the number of the
channel that was exported. The following properties will then be available:
period - The total period of the PWM signal (read/write).
Value is in nanoseconds and is the sum of the active and inactive
time of the PWM.
duty_cycle - The active time of the PWM signal (read/write).
Value is in nanoseconds and must be less than the period.
polarity - Changes the polarity of the PWM signal (read/write).
Writes to this property only work if the PWM chip supports changing
the polarity. The polarity can only be changed if the PWM is not
enabled. Value is the string "normal" or "inversed".
enable - Enable/disable the PWM signal (read/write).
0 - disabled
1 - enabled
I hope this is helpful for you.