-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPI broken on stm32f412 on master #21679
Comments
I experienced the same issue with the effect that the SPI_NOR driver did not initialize anymore (it receives the wrong device id). |
Behavior of sending 16bits in 8bits mode when possible is not working with all slaves, as it appears. should be It should be optional and not be active by default. Fixes zephyrproject-rtos#21546 Fixes zephyrproject-rtos#21679 Signed-off-by: Erwan Gouriou <[email protected]>
@erwango I put your changes in but it is still broken for me it looks that the rx never stops (spi_context_wait_for_completion does not return). That is why the CS does not go high I have the same behavior on SPI1 and SPI3 and different ICs. On SPI1 I have a SST26VF016B flash and on SPI3 I have some sensors (ADS1292 & LSM6DS3). |
Refactoring of function spi_stm32_shift_m8/16 in PR zephyrproject-rtos#20948 which introduced optional behavior "Allow 16bit sends in 8bit mode if possible in master-only mode" has not been done with respecting previous function behavior. Fix newly created functions to respect flow of previous code: -Do not impact spi context before tx empty condition is verified -Update tx context and get tx_frame under spi_context_tx_on condition (not spi_context_tx_buf_on condition) -Always update rx context after data reception, not only under spi_context_rx_buf_on condition Last fix is known to fix regression on some cases. Two first changes may be conservative and revisited individually later on, aim is to minimize the changes in a first iteration. Fixes zephyrproject-rtos#21679 Signed-off-by: Erwan Gouriou <[email protected]>
…ossible" This reverts commit 2ce8fa1. Fixes zephyrproject-rtos#21546 Fixes zephyrproject-rtos#21679 Signed-off-by: Erwan Gouriou <[email protected]>
…ossible" This reverts commit 2ce8fa1. Fixes #21546 Fixes #21679 Signed-off-by: Erwan Gouriou <[email protected]>
I pulled the latest master and the SPI stopped working.
My config:
but it does not matter if we are using interrupts or not.
the code:
My log print:
on the logic analyzer:
Some comment:
1.) I checked the SPI coms via an older firmware that only uses STM32HAL and it works there. So we can say that the (flash) IC is not broken.
2.) there is no timeout, so the firmware breaks at https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/spi/spi_ll_stm32.c#L495 while waiting
3.) looks for me that the tx is send, but it somehow messes up while rx. There were some changes and maybe the
rx_buf
setup is no invaildThe text was updated successfully, but these errors were encountered: