Hello guys,
Is there any python module that support DMA. I want to receive data with SPI in Raspberry PI4 using DMA.
hey could you please give me the link that indicates this information. It did work but i want to understand why and i couldn't find the perfect justification. i also want to know if we can change the maximum number of data, i mean is it possible to change 96 ?cleverca22 wrote: ↑Fri Jul 10, 2020 7:03 pmi think i saw in the kernel source, that spidev will use dma, of the amount of data is over a certain size limit
edit:
yep: https://github.com/raspberrypi/linux/bl ... 2835.c#L77
any transfer over 96 bytes will use DMA
Code: Select all
static bool bcm2835_spi_can_dma(struct spi_master *master,
struct spi_device *spi,
struct spi_transfer *tfr)
{
/* only run for gpio_cs */
if (!gpio_is_valid(spi->cs_gpio))
return false;
/* we start DMA efforts only on bigger transfers */
if (tfr->len < BCM2835_SPI_DMA_MIN_LENGTH)
return false;