Open allemanm opened 5 months ago
@EmilioCBen, take a look at this when we get to feature freeze
Hi @allemanm ,
Since this issue depends on the DMA and is affected by the cache, I suspect the cause of this issue is that the buffer used by the SPI driver is cached. On the RT1050, by default the linker places data in the external SDRAM, which is all cached. The cache is only for the M7 CPU. So it seems likely the issue here is that when the app writes to the pixels
buffer, it is written to the cache. But that buffer in SDRAM is not updated, and therefore the DMA does not read the same data.
If using the DMA on a platform like this, the app should place the DMA buffers in non-cacheable memory. The spi_loopback test does this by placing the buffers in the .nocache region.
Best regards
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
Describe the bug I build and run
samples/drivers/led_strip/
on the MIMXRT1050_EVK with DMA enabled for LPSPI. However, no data is put on MOSI pin. When I disable DCACHE, the data is put on the bus properly. I checked out Zephyr on commitf86f390baf27a48768b6bd3cd1285b54970c537c
To Reproduce Steps to reproduce the behavior:
prj.conf
by addingCONFIG_SPI_MCUX_LPSPI_DMA=y
mimxrt1050_evk.overlay
by changing&lpspi3
to&lpspi1
west build -p -b mimxrt1050_evk samples/drivers/led_strip/
west flash -r jlink
prj.conf
by addingCONFIG_DCACHE=n
prj.conf
mimxrt1050_evk.overlay
Expected behavior I would expect the lpspi driver to work properly when both
CONFIG_SPI_MCUX_LPSPI_DMA
andCONFIG_DCACHE
are enabled.Logs and console output With DCACHE disabled there is a signal on the MOSI pin
Environment (please complete the following information):
f86f390baf27a48768b6bd3cd1285b54970c537c