Open sandyscott opened 1 year ago
I'm having the same issue.
Example:
from machine import Pin
from rp2 import PIO, StateMachine, asm_pio
from time import sleep
@asm_pio(sideset_init=PIO.OUT_LOW)
def pwm_prog():
pull(noblock) .side(0)
mov(x, osr) # Keep most recent pull data stashed in X, for recycling by noblock
mov(y, isr) # ISR must be preloaded with PWM count max
label("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