Skip to content

Conversation

@decsny
Copy link
Member

@decsny decsny commented Oct 28, 2025

There is a race condition in this method of CS behavior verification,
where multiple CS signal transitions can happen during one interrupt
processing, thereby only getting one callback and marking the trigger
count as being less than what is accurate. At least we can account for
most real situations where this happens by also looking at the CS pin
logic level and comparing to how it started, to potentially realize that
there was another edge that happened when it either should or shouldn't
have happened.

Also contains another fix to just report that the HOLD_ON_CS flag is not supported by the flexcomm SPI driver, because this PR is originally for fixing #95359 and both commits are related to that.

Fixes #95359 (I think)

If rx and tx length are both 0 in dma path then do nothing.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There is a race condition in this method of CS behavior verification,
where multiple CS signal transitions can happen during one interrupt
processing, thereby only getting one callback and marking the trigger
count as being less than what is accurate. At least we can account for
most real situations where this happens by also looking at the CS pin
logic level and comparing to how it started, to potentially realize that
there was another edge that happened when it either should or shouldn't
have happened.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
@decsny decsny marked this pull request as ready for review October 28, 2025 20:29
@zephyrbot zephyrbot added area: Tests Issues related to a particular existing or missing test area: SPI SPI bus platform: NXP NXP labels Oct 28, 2025
@sonarqubecloud
Copy link

@decsny decsny added this to the v4.3.0 milestone Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: SPI SPI bus area: Tests Issues related to a particular existing or missing test platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spi_loopback fails on frdm_rw612 with DMA and/or cs_loopback

3 participants