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/06/05 19:52:08 UTC
[GitHub] [incubator-nuttx] davids5 opened a new pull request #1203: stm32h7:DMA Add BDMA support
davids5 opened a new pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203
## Summary
This adds BDMA support for the STM32F7. It preserves the (s)DMA API by mapping the DMA config bits to the BDMA config bits and BDMA status back to DMA status.
## Impact
You can uses BDMA now! All drivers that use DMA can now use BDMA (if applicable i.e. IP blocks are in D3 power domain) with NO code changes except for locating DMA buffers in sram4.
## Testing
Using a nucleo-h743zi I sent and received data on SPI6.
Connect CN7-12 (miso) to CN7-14 (mosi)
tx data was 0x0-0x63 (0 - 100).
After transfer (verifying BDMA calls) the RX data in SRAM4 matches that TX data!
![image](https://user-images.githubusercontent.com/1945821/83916840-b8da4a00-a72a-11ea-8e9b-5893e264c15e.png)
----------------------------------------------------------------
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 pull request #1203: stm32h7:DMA Add BDMA support
Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203#issuecomment-640094272
@raiden00pl - Thank you, all suggestions incorporated, and squashed.
On the Brace alignment style check failure: See https://github.com/apache/incubator-nuttx/pull/1045#issuecomment-628681515
----------------------------------------------------------------
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 pull request #1203: stm32h7:DMA Add BDMA support
Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203#issuecomment-639758891
@jlaitine FYI this should drop in to the slave code.
----------------------------------------------------------------
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] raiden00pl commented on a change in pull request #1203: stm32h7:DMA Add BDMA support
Posted by GitBox <gi...@apache.org>.
raiden00pl commented on a change in pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203#discussion_r436254029
##########
File path: arch/arm/src/stm32h7/stm32_dma.c
##########
@@ -1714,12 +1714,23 @@ static void stm32_sdma_dump(DMA_HANDLE handle, const char *msg)
static void stm32_bdma_disable(DMA_CHANNEL dmachan)
{
- DMA_CHANNEL dmachan = (DMA_CHANNEL)handle;
- uint8_t controller = dmachan->ctrl;
+ uint32_t regval = 0;
- DEBUGASSERT(controller == BDMA);
+ DEBUGASSERT(dmachan->ctrl == BDMA);
+ DEBUGASSERT(dmachan->chan < 8);
Review comment:
Maybe we should use the defined value?
```suggestion
DEBUGASSERT(dmachan->chan < BDMA_NCHAN);
```
----------------------------------------------------------------
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] raiden00pl commented on a change in pull request #1203: stm32h7:DMA Add BDMA support
Posted by GitBox <gi...@apache.org>.
raiden00pl commented on a change in pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203#discussion_r436253202
##########
File path: arch/arm/src/stm32h7/stm32_dma.c
##########
@@ -1714,12 +1714,23 @@ static void stm32_sdma_dump(DMA_HANDLE handle, const char *msg)
static void stm32_bdma_disable(DMA_CHANNEL dmachan)
{
- DMA_CHANNEL dmachan = (DMA_CHANNEL)handle;
- uint8_t controller = dmachan->ctrl;
+ uint32_t regval = 0;
Review comment:
```suggestion
uint32_t regval = 0;
```
----------------------------------------------------------------
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 pull request #1203: stm32h7:DMA Add BDMA support
Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203#issuecomment-640099076
Thank you @raiden00pl and @Ouss4!
----------------------------------------------------------------
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 pull request #1203: stm32h7:DMA Add BDMA support
Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203#issuecomment-639761872
committers - this will need same the brace exception as last time.
----------------------------------------------------------------
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] Ouss4 merged pull request #1203: stm32h7:DMA Add BDMA support
Posted by GitBox <gi...@apache.org>.
Ouss4 merged pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203
----------------------------------------------------------------
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] raiden00pl commented on a change in pull request #1203: stm32h7:DMA Add BDMA support
Posted by GitBox <gi...@apache.org>.
raiden00pl commented on a change in pull request #1203:
URL: https://github.com/apache/incubator-nuttx/pull/1203#discussion_r436251833
##########
File path: arch/arm/src/stm32h7/stm32_dma.c
##########
@@ -1732,7 +1743,66 @@ static void stm32_bdma_disable(DMA_CHANNEL dmachan)
static int stm32_bdma_interrupt(int irq, void *context, FAR void *arg)
{
-#warning stm32_bdma_interrupt not implemented
+ DMA_CHANNEL dmachan = NULL;
+ uint32_t status = 0;
+ uint32_t scrstatus = 0;
Review comment:
```suggestion
uint32_t scrstatus = 0;
```
----------------------------------------------------------------
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