Skip to content

Commit

Permalink
2023-06-07-twpm-spi-fix.md: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Maciej Pijanowski <[email protected]>
  • Loading branch information
arturkow2 and macpijan authored Jul 28, 2023
1 parent c2ffeb7 commit 6fe6276
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blog/content/post/2023-06-07-twpm-spi-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ disable SPI, causing a few things:
We decided to continue the tests using only HAL and STM32CubeIDE (we plan to
port the solution back to Zephyr). From earlier tests, we already know that HAL
also does not work correctly, but it is easier to roll a custom solution.
also does not work correctly, but it is easier to roll out a custom solution.
So, I created a new STM32CubeMX project and set up the SPI2 controller through
the graphical configuration manager. Basic settings involve configuring SPI as a
Expand Down Expand Up @@ -602,7 +602,7 @@ static void txdma_complete(DMA_HandleTypeDef *hdma)
}
```
On Python side I introduce a new function:
On Python side I introduced a new function:
```python
def tpm_read(size: int) -> bytes:
Expand All @@ -626,7 +626,7 @@ def tpm_read(size: int) -> bytes:
return spi.xfer(empty)
```

And update the test:
And updated the test:

```python
@test
Expand All @@ -636,7 +636,7 @@ def test_read():
```

After running the test code, I immediately got an error, the logic analyzer
showing:
was showing:

![](/img/stm32-spi-failure.png)

Expand Down

0 comments on commit 6fe6276

Please sign in to comment.