How do I get the ISR bit counts value for the micropython app #14495
Unanswered
sloshyou
asked this question in
RP2040 / Pico
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a project composed of two state machines rp2.asm_pio().
The state machine n1 reads a data frame by executing the in_(pins, 1) instruction in which the beginning and end of reading (using the jmp(pin) instruction) depends on a GPIO input from the state machine n2.
The n1 state machine configurations are:
autopush = True
push_thres = 32
in_shiftdir=rp2.PIO.SHIFT_LEFT
State machine n2 has the function of detecting the beginning and end of the data frame and sends a corresponding GPIO output to state machine n2.
My issue is that when the state machine n2 detects the end of the data frame, sometimes it doesn't completely fill the RX_FIFO and I need to know how many bits it actually shifted. In the RP2040 datasheet they refer to the ISR register, but I don't understand how I can extract the value from the bit counts in RX_FIFO. Is there another register? Anybody can help me. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions