Skip to content
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

[Bug] bsp/hpmicro SDIO和SPI驱动部分场景下有BUG #9784

Open
aozima opened this issue Dec 17, 2024 · 0 comments
Open

[Bug] bsp/hpmicro SDIO和SPI驱动部分场景下有BUG #9784

aozima opened this issue Dec 17, 2024 · 0 comments

Comments

@aozima
Copy link
Member

aozima commented Dec 17, 2024

RT-Thread Version

5.2.0

Hardware Type/Architectures

HPM6750

Develop Toolchain

GCC

Describe the bug

  1. SDIO在DATA_DIR_WRITE时,xfer_buf_addr的对齐判断有笔误,同时建议修改为cache line对齐
-            if ((xfer_buf_addr % 4 != 0) && (write_size % 4 != 0))
+            if ((xfer_buf_addr % 4 != 0) || (write_size % 4 != 0))
  1. SPI驱动在使用 rt_spi_send_then_recv 这类2个msg连续传输时,有较大的概率,spi_isr可能只会进第1次,进而造成后面的rt_sem_take(spi->spi_xfer_done_sem, RT_WAITING_FOREVER);会一直等待。
    这里需要分析原因,或在DMA接收模式模式下,是否可以去掉这个这个等待,因为只要DMA接收完成,SPI一定传输完成了。
-            rt_sem_take(spi->spi_xfer_done_sem, RT_WAITING_FOREVER);
+            // rt_sem_take(spi->spi_xfer_done_sem, RT_WAITING_FOREVER);

Other additional context

No response

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

No branches or pull requests

1 participant