You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/19 04:24:40 UTC

[GitHub] [incubator-nuttx] w8jcik opened a new issue #2567: Not possible to use SPI3 DMA1, Stream 0, Channel 0 on STM32F4

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:
users@infra.apache.org



[GitHub] [incubator-nuttx] w8jcik closed issue #2567: Not possible to select SPI3 DMA RX1 on STM32 F2, F4, F7, H7

Posted by GitBox <gi...@apache.org>.
w8jcik closed issue #2567:
URL: https://github.com/apache/incubator-nuttx/issues/2567


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] dagar commented on issue #2567: Not possible to select SPI3 DMA RX1 on STM32 F2, F4, F7, H7

Posted by GitBox <gi...@apache.org>.
dagar commented on issue #2567:
URL: https://github.com/apache/incubator-nuttx/issues/2567#issuecomment-748709412


   Nice find, would a quick define for invalid (UINT8_MAX) suffice?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 commented on issue #2567: Not possible to select SPI3 DMA RX1 on STM32 F2, F4, F7, H7

Posted by GitBox <gi...@apache.org>.
davids5 commented on issue #2567:
URL: https://github.com/apache/incubator-nuttx/issues/2567#issuecomment-748473231


   @w8jcik - Good find and thank you for the clear explanation of the issue. I will check all the drivers and would up a solution.


----------------------------------------------------------------
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:
users@infra.apache.org