Skip to content
Discussion options

You must be logged in to vote

First: use triple ` before and after code blocks to get multiline code formatting.

In sm_read = StateMachine(0, freq=10000, in_base) the program is missing, you correct to:
sm_read = StateMachine(0, state_function, freq=10000, in_base=pp) where pp is the pin number you would like to read from with your in_(pins, 1) instruction.

With this instruction the ISR gets filled and you push the ISR correctly after 30 such fills to the FIFO.
Your state machine runs your program cyclically for 3 seconds but the FIFO has only 4 words, so from the 5-th iteration onwards the pushed data are lost because the RX_FIFO is full.
The FIFO is cleared automatically by reading it. So you first query the number …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Prakhar005
Comment options

@rkompass
Comment options

@Prakhar005
Comment options

@rkompass
Comment options

Answer selected by Prakhar005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants