Skip to content

Conversation

@rettichschnidi
Copy link
Contributor

@rettichschnidi rettichschnidi commented Oct 16, 2024

This improves adherence to documented behavior and makes it harder to use the driver wrongly.

@rettichschnidi rettichschnidi force-pushed the gardena/rs/upstream/sim3u-dma-better-start-stop-config branch from 035dfc9 to 1c84afb Compare October 16, 2024 23:23
@rettichschnidi rettichschnidi marked this pull request as ready for review October 17, 2024 09:37
@zephyrbot zephyrbot added platform: Silabs SiM3U Silicon Labs SiM3U area: DMA Direct Memory Access labels Oct 17, 2024
@rettichschnidi rettichschnidi force-pushed the gardena/rs/upstream/sim3u-dma-better-start-stop-config branch from 1c84afb to 531a9c3 Compare October 17, 2024 09:57
@rettichschnidi rettichschnidi force-pushed the gardena/rs/upstream/sim3u-dma-better-start-stop-config branch from 531a9c3 to 8e3d578 Compare October 17, 2024 10:42
@rettichschnidi rettichschnidi requested a review from ceolin October 17, 2024 10:44
jhedberg
jhedberg previously approved these changes Oct 17, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the channel is not stopped this would be an error. See the DMA state diagrams https://docs.zephyrproject.org/latest/hardware/peripherals/dma.html#channel-state-machine-expectations

Let me know if something is unclear.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, feeling silly now. Need to rework this PR.

Copy link
Contributor Author

@rettichschnidi rettichschnidi Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pushed an improved version.

Regarding the documentation: It seem to me as if is missing the transition from Configured to Configured by using dma_config. Would create a PR for this if true. #80206

@rettichschnidi rettichschnidi removed the request for review from ceolin October 17, 2024 13:17
@rettichschnidi rettichschnidi marked this pull request as draft October 17, 2024 13:19
As per dma_stop() documentation, the implementation has to not just stop
the transfer, but also to disable the channel. Before this commit, only
the transfer has been stopped.

Same goes for dma_start(). This also allows the enabling of a channel to
be removed from dma_si32_config().

Signed-off-by: Reto Schneider <[email protected]>
@rettichschnidi rettichschnidi force-pushed the gardena/rs/upstream/sim3u-dma-better-start-stop-config branch from 8e3d578 to bf7cf51 Compare October 22, 2024 08:49
@rettichschnidi rettichschnidi marked this pull request as ready for review October 22, 2024 08:51
@jhedberg
Copy link
Member

@rettichschnidi do you actually need the "reorder function definitions" commit anymore?

As per Zephyr DMA documentation, dma_config() must not be done on a
running channel.

Signed-off-by: Reto Schneider <[email protected]>
@rettichschnidi rettichschnidi force-pushed the gardena/rs/upstream/sim3u-dma-better-start-stop-config branch from bf7cf51 to 4c82250 Compare October 22, 2024 09:13
@rettichschnidi
Copy link
Contributor Author

@rettichschnidi do you actually need the "reorder function definitions" commit anymore?

Gone

@rettichschnidi rettichschnidi requested a review from teburd October 22, 2024 13:42
@carlescufi carlescufi merged commit 67cb174 into zephyrproject-rtos:main Oct 24, 2024
24 checks passed
@rettichschnidi rettichschnidi deleted the gardena/rs/upstream/sim3u-dma-better-start-stop-config branch July 8, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: DMA Direct Memory Access platform: Silabs SiM3U Silicon Labs SiM3U

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants