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
frommachineimportPinfromrp2importPIO, StateMachine, asm_piofromtimeimportsleep@asm_pio(sideset_init=PIO.OUT_LOW)defpwm_prog():
pull(noblock) .side(0)
mov(x, osr) # Keep most recent pull data stashed in X, for recycling by noblockmov(y, isr) # ISR must be preloaded with PWM count maxlabel("pwmloop")
jmp(x_not_y, "skip")
nop() .side(1)
label("skip")
jmp(y_dec, "pwmloop")
There are other error hints as well. It seems to me, that maybe the bundled µPython isn't the latest version? Can this be changed by the user? For example the class StateMachine doesn't have a exec() method, although in newer version it seems to have it, since the code runs completely fine when just flashing it to the RP2040.
If you have a PIO program assembled in a python file, all of the instuctions are flagged as "Unresolved reference" errors.
appears as
This issue applies to all instructions and directives appearing the program.
The full list of instructions and directives is visible in the official documentation:
Programmable IO - MicroPython latest documentation
The text was updated successfully, but these errors were encountered: