Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/drivers/spi/spi_loopback/overlay-mcux-dspi-dma.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# enable DMA mode
CONFIG_DMA=y
CONFIG_DSPI_MCUX_EDMA=y
CONFIG_MCUX_DSPI_BUFFER_SIZE=144
CONFIG_MCUX_DSPI_BUFFER_SIZE=5760
12 changes: 12 additions & 0 deletions tests/drivers/spi/spi_loopback/src/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ static struct spi_dt_spec spi_slow = SPI_DT_SPEC_GET(SPI_SLOW_DEV, SPI_OP(FRAME_
#define STACK_SIZE (512 + CONFIG_TEST_EXTRA_STACK_SIZE)
#define BUF_SIZE 18
#define BUF2_SIZE 36

#ifdef CONFIG_DSPI_MCUX_EDMA
/*DSPI DMA need aligned buffer for internal*/
#define BUF3_SIZE 1440
Copy link
Contributor

Choose a reason for hiding this comment

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

1440 or 2440 (see your commit message) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1440 typo

Copy link
Contributor

Choose a reason for hiding this comment

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

ok. Btw in your commit message: s/fixing:/Fixes:

#else
#define BUF3_SIZE 8192
#endif


#if CONFIG_NOCACHE_MEMORY
#define __NOCACHE __attribute__((__section__(".nocache")))
Expand Down Expand Up @@ -481,6 +488,11 @@ static int spi_rx_bigger_than_tx(struct spi_dt_spec *spec)
return 0;
}

if (IS_ENABLED(CONFIG_DSPI_MCUX_EDMA)) {
LOG_INF("Skip rx bigger than tx");
return 0;
}

LOG_INF("Start rx bigger than tx");

(void)memset(buffer_rx, 0xff, BUF_SIZE);
Expand Down