You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defgenerate(self, period, duty_cycle):
# ...ifperiodnotinrange(1, 65536):
raiseValueError("Valid tone period is between 1 and 65536.")
ifduty_cyclenotinrange(1, 99):
raiseValueError("Valid duty cycle is between 1 and 99.")
# ...
On Jupyter Lab, it fails if we execute:
pwm_1.generate(65536,25)
Error message:
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/lib/pmod/pmod_pwm.py in generate(self, period, duty_cycle)
95 """
96 if period not in range(1, 65536):
---> 97 raise ValueError("Valid tone period is between 1 and 65536.")
98 if duty_cycle not in range(1, 99):
99 raise ValueError("Valid duty cycle is between 1 and 99.")
ValueError: Valid tone period is between 1 and 65536.
Another failed point:
pwm_1.generate(10,99)
Caused:
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/lib/pmod/pmod_pwm.py in generate(self, period, duty_cycle)
97 raise ValueError("Valid tone period is between 1 and 65536.")
98 if duty_cycle not in range(1, 99):
---> 99 raise ValueError("Valid duty cycle is between 1 and 99.")
100
101 self.microblaze.write_mailbox(0, [period, duty_cycle])
ValueError: Valid duty cycle is between 1 and 99.
Best regards,
Hai Pham
The text was updated successfully, but these errors were encountered:
Hi,
I found an invalid boundary value in pynq/lib/pmod/pmod_pwm.py.
On Jupyter Lab, it fails if we execute:
Error message:
Another failed point:
Caused:
Best regards,
Hai Pham
The text was updated successfully, but these errors were encountered: