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/08/17 20:08:34 UTC

[GitHub] [incubator-nuttx] davids5 commented on issue #1598: stm32f7 serial miss SERIAL_HAVE_CONSOLE_DMA definition

davids5 commented on issue #1598:
URL: https://github.com/apache/incubator-nuttx/issues/1598#issuecomment-675086892


   > stm32f7/stm32_uart.h miss defining of SERIAL_HAVE_CONSOLE_DMA as it is done in general stm32:
   > https://github.com/apache/incubator-nuttx/blob/85428036abfe5d2e8fc9caec8b573dc2dafed7ac/arch/arm/src/stm32/stm32_uart.h#L338-L357
   > 
   > This can leads to hardfault when trying to write with not yet initialized serial dma in case when serial is used for console and something try to write to console on boot (for example board_hardfault_init in px4 can write to syslog (and to console if CONFIG_SYSLOG_CONSOLE defined), just for your note @davids5 if it is important).
   > 
   > I could done a PR, but I wonder with several things:
   > 
   > 1. Why CONFIG_USARTx_TXDMA are not listed in [configuration variables](https://cwiki.apache.org/confluence/display/NUTTX/Configuration+Variables)?
   
   These come in from the serial driver. I believe  that @patacongo did a pass were he moved all the different UxART into common code.   But I we lost the enables. I did not follow the change at the time. We should get a clarification from Greg, on how it is suppose to work. 
   
   ![image](https://user-images.githubusercontent.com/1945821/90438499-e6c3ff00-e088-11ea-9798-1062bfe1bd6a.png)
   
   
   > 2. Can TXDMA be used without RXDMA? Because now TXDMA checks are performed inside SERIAL_HAVE_RXDMA
   >    https://github.com/apache/incubator-nuttx/blob/85428036abfe5d2e8fc9caec8b573dc2dafed7ac/arch/arm/src/stm32f7/stm32_serial.c#L89
   
   Yes as it ends at Line 183
   https://github.com/apache/incubator-nuttx/blob/85428036abfe5d2e8fc9caec8b573dc2dafed7ac/arch/arm/src/stm32f7/stm32_serial.c#L183
   
   
   > 3. Why stm32/stm32_uart.h checks only **RX** DMA to define SERIAL_HAVE_CONSOLE_DMA?
   
   There is no TX DMA on the F4. 
   


----------------------------------------------------------------
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