Skip to content

Conversation

@rthomp10
Copy link

For convenience, a compile script was added along with an SPI port definition fix in the testbench. The sequencer also now correctly assigns the LEDs once the SPI read is finished. The SPI read speed was also set to update the LEDs about every 1ms.
stp1.stp

rthomp10 added 4 commits June 24, 2024 11:28
The clock is 10MHz and the default div_coef is 10k. This sets the spi
clock to 500Hz (1kHz/spi clk transition). The accelerometer spi read
spec is 10MHz, so we have plenty of room to speed up the reads.

Setting the div_coef to 200 sets the spi clock to 25kHz. It takes 25
iterations to get the new value, so the new response time is about 1ms.
the led assignment was made at the beginning of the spi read, therefore
assigning the last result to the leds. the led wait state was added to
the sequencer fsm to wait until the spi read is finished, and then it
writes the result to the leds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant