w8jcik opened a new issue #2567: URL: https://github.com/apache/incubator-nuttx/issues/2567
In `arch/arm/src/stm32/stm32_spi.c` This commit [cfc5b59](https://github.com/apache/incubator-nuttx/commit/cfc5b596364ddbe163009c69309ababe62309c98) from NuttX 7.27 added a check if DMA channels are defined, before enabling DMA for SPI. ``` if (priv->rxch && priv->txch) ``` Type of `rxch` is `uint8_t` and `0` is used to indicate no channel being assigned. It is fine except if we use something like this: ``` #define DMACHAN_SPI3_RX DMAMAP_SPI3_RX_1 /* DMA1, Stream 0, Channel 0 */ #define DMACHAN_SPI3_TX DMAMAP_SPI3_TX_1 /* DMA1, Stream 5, Channel 0 */ ``` `DMAMAP_SPI3_RX_1` defined in `arch/arm/src/stm32/chip/stm32f40xxx_dma.h` is `0`, so it is detected as lack of DMA channel assigned. I found it in 7.27, didn't check it with 10, but just by looking at the code I think the issue is still in place. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
