Sending the same word over SPI many times
Posted: Tue Jun 12, 2018 11:43 am
Hello,
I'm using ChibiOS on STM32F103, communicating with a TFT display over SPI. I order to fill the screen (or part of the screen) with the same colour efficiently, I would like to be able to send the same 16-bit word over SPI many times in one DMA transaction. If I understand it correctly, the best way to do so would to set up a DMA transfer with the cleared STM32_DMA_CR_MINC flag. Unfortunately, there is no way to do it in ChibiOS - the spi_lld_exchange function always sets the MINC flag. Do you think it would be a good idea to expose this flag to the user somehow? Maybe change spi_lld_exchange to accept an optional boolean parameter, or something like this?
I'm using ChibiOS on STM32F103, communicating with a TFT display over SPI. I order to fill the screen (or part of the screen) with the same colour efficiently, I would like to be able to send the same 16-bit word over SPI many times in one DMA transaction. If I understand it correctly, the best way to do so would to set up a DMA transfer with the cleared STM32_DMA_CR_MINC flag. Unfortunately, there is no way to do it in ChibiOS - the spi_lld_exchange function always sets the MINC flag. Do you think it would be a good idea to expose this flag to the user somehow? Maybe change spi_lld_exchange to accept an optional boolean parameter, or something like this?