You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "danielappiagyei-bc (via GitHub)" <gi...@apache.org> on 2023/10/15 00:40:14 UTC
[PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
danielappiagyei-bc opened a new pull request, #10911:
URL: https://github.com/apache/nuttx/pull/10911
## Summary
TODO
## Impact
TODO
## Testing
TODO
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "danielappiagyei-bc (via GitHub)" <gi...@apache.org>.
danielappiagyei-bc commented on PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#issuecomment-1777940825
> So strike this. See [#10912 (comment)](https://github.com/apache/nuttx/issues/10912#issuecomment-1777212451)
>
> You might want to rebase on master after #11020 comes in and bring in all the other bits not related to serial or DMA
Thanks david, I will close this PR and create a new one for the leftover changes. This will be:
- typos
- adding `IMXRT_SERIAL_RXDMA_BUFFER_SIZE` as a kconfig
- add missing `uintptr_t base;` declaration to `arch/arm/src/imxrt/imxrt_edma.c` so compiling with `CONFIG_DEBUG_DMA=y` works
- enabling `LPUART_CTRL_ORIE` for overruns in `arch/arm/src/imxrt/imxrt_serial.c`. It's an error condition just like the noise, framing, and parity error interrupts we have enabled and we are already explicitly clearing it in [here](https://github.com/apache/nuttx/blob/master/arch/arm/src/imxrt/imxrt_serial.c#L1792)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "danielappiagyei-bc (via GitHub)" <gi...@apache.org>.
danielappiagyei-bc commented on PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#issuecomment-1763719375
> @danielappiagyei-bc Great! - The residual change needs to be applied the S32K, and K66
Hi @davids5 , I've now applied these changes to the S32K devices but couldn't find a "k66", could you point me to the file?
Also I didn't enable an interrupt for overruns on these S32K devices, would you like me to? Thanks
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on code in PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#discussion_r1359839409
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -60,6 +60,24 @@
#ifdef USE_SERIALDRIVER
+#if defined(SERIAL_HAVE_TXDMA)
Review Comment:
the TCD pool is shared across all devices. So this is only a Band-Aid. For the minimal case
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -1370,11 +1388,22 @@ static inline void imxrt_serialout(struct imxrt_uart_s *priv,
****************************************************************************/
#ifdef SERIAL_HAVE_RXDMA
-static int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
+static unsigned int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
Review Comment:
:1
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -1531,12 +1560,13 @@ static int imxrt_dma_setup(struct uart_dev_s *dev)
modifyreg32(priv->uartbase + IMXRT_LPUART_BAUD_OFFSET,
0, LPUART_BAUD_RDMAE);
- /* Enable itnerrupt on Idel and erros */
+ /* Enable interrupt on Idle and errors */
Review Comment:
Add Over run to Comment
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "danielappiagyei-bc (via GitHub)" <gi...@apache.org>.
danielappiagyei-bc commented on code in PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#discussion_r1360096819
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -1531,12 +1560,13 @@ static int imxrt_dma_setup(struct uart_dev_s *dev)
modifyreg32(priv->uartbase + IMXRT_LPUART_BAUD_OFFSET,
0, LPUART_BAUD_RDMAE);
- /* Enable itnerrupt on Idel and erros */
+ /* Enable interrupt on Idle and errors */
Review Comment:
done!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#discussion_r1359764037
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -60,6 +60,24 @@
#ifdef USE_SERIALDRIVER
+#if defined(SERIAL_HAVE_TXDMA)
Review Comment:
```suggestion
#if defined(SERIAL_HAVE_TXDMA) && CONFIG_IMXRT_EDMA_NTCD < 2
# error Each LPUART using TXDMA requires 2 EDMA TCDs for setting up transfers
#endif
```
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -60,6 +60,24 @@
#ifdef USE_SERIALDRIVER
+#if defined(SERIAL_HAVE_TXDMA)
+#if CONFIG_IMXRT_EDMA_NTCD < 2
+#error Each LPUART using TXDMA requires 2 EDMA TCDs for setting up transfers
+#endif
+#endif /* SERIAL_HAVE_TXDMA */
+
+#if defined(SERIAL_HAVE_RXDMA)
+#if CONFIG_IMXRT_EDMA_NTCD < 1
+#error Each LPUART using RXDMA requires 1 EDMA TCD for setting up transfers
+#endif
+#endif /* SERIAL_HAVE_RXDMA */
+
+#if defined(SERIAL_HAVE_TXDMA) && defined(SERIAL_HAVE_RXDMA)
+#if CONFIG_IMXRT_EDMA_NTCD < 3
Review Comment:
ditto
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -60,6 +60,24 @@
#ifdef USE_SERIALDRIVER
+#if defined(SERIAL_HAVE_TXDMA)
+#if CONFIG_IMXRT_EDMA_NTCD < 2
+#error Each LPUART using TXDMA requires 2 EDMA TCDs for setting up transfers
+#endif
+#endif /* SERIAL_HAVE_TXDMA */
+
+#if defined(SERIAL_HAVE_RXDMA)
+#if CONFIG_IMXRT_EDMA_NTCD < 1
+#error Each LPUART using RXDMA requires 1 EDMA TCD for setting up transfers
Review Comment:
ditto
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#issuecomment-1764314844
> > @danielappiagyei-bc Great! - The residual change needs to be applied the S32K, and K66
>
> Hi @davids5 , I've now applied these changes to the S32K devices but couldn't find a "k66", could you point me to the file? Also I didn't enable an interrupt for overruns on these S32K devices, would you like me to? Thanks
Sorry I called it by name not family https://github.com/apache/nuttx/blob/master/arch/arm/src/kinetis/kinetis_edma.c
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#issuecomment-1777584962
> > > @danielappiagyei-bc Great! - The residual change needs to be applied the S32K, and K66
> >
> >
> > Hi @davids5 , I've now applied these changes to the S32K devices but couldn't find a "k66", could you point me to the file? Also I didn't enable an interrupt for overruns on these S32K devices, would you like me to? Thanks
>
> Sorry I called it by name not family https://github.com/apache/nuttx/blob/master/arch/arm/src/kinetis/kinetis_edma.c
So strike this. See https://github.com/apache/nuttx/issues/10912#issuecomment-1777212451
You might want to rebase on master after https://github.com/apache/nuttx/pull/11020 comes in and bring in all the other bits not related to serial or DMA
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "danielappiagyei-bc (via GitHub)" <gi...@apache.org>.
danielappiagyei-bc closed pull request #10911: imxrt:serial rxdma reporting incorrect characters
URL: https://github.com/apache/nuttx/pull/10911
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#discussion_r1360594653
##########
arch/arm/src/imxrt/Kconfig:
##########
@@ -183,7 +183,7 @@ config IMXRT_APP_FORMAT_MCUBOOT
select IMXRT_HAVE_OTA_PARTITION
depends on EXPERIMENTAL
---help---
- The MCUboot support of loading the firmware images.
+ The MCUboot support of loading the firmware images.
Review Comment:
```suggestion
The MCUboot support of loading the firmware images.
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "danielappiagyei-bc (via GitHub)" <gi...@apache.org>.
danielappiagyei-bc commented on PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#issuecomment-1777950659
> So strike this. See https://github.com/apache/nuttx/issues/10912#issuecomment-1777212451
> You might want to rebase on master after https://github.com/apache/nuttx/pull/11020 comes in and bring in all the other bits not related to serial or DMA
Per david, he has found the cause to the issue and is fixing in his PR. See https://github.com/apache/nuttx/pull/10911#issuecomment-1777940825 for what I will add in followup PR
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "danielappiagyei-bc (via GitHub)" <gi...@apache.org>.
danielappiagyei-bc commented on code in PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#discussion_r1360098848
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -60,6 +60,24 @@
#ifdef USE_SERIALDRIVER
+#if defined(SERIAL_HAVE_TXDMA)
Review Comment:
totally agree. I just found myself using a single lpuart device with DMA for the first time and it wasn't obvious to me why dma wasn't working properly (no transfers were occurring) until I stumbled upon the fact that you need to set `CONFIG_IMXRT_EDMA_NTCD` appropriately. I wasn't sure of a better way to communicate this to the user and was hoping these compile-time checks would help at least a few people :)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "danielappiagyei-bc (via GitHub)" <gi...@apache.org>.
danielappiagyei-bc commented on code in PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#discussion_r1360096659
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -60,6 +60,24 @@
#ifdef USE_SERIALDRIVER
+#if defined(SERIAL_HAVE_TXDMA)
Review Comment:
done!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]
Posted by "danielappiagyei-bc (via GitHub)" <gi...@apache.org>.
danielappiagyei-bc commented on code in PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#discussion_r1361100046
##########
arch/arm/src/imxrt/Kconfig:
##########
@@ -183,7 +183,7 @@ config IMXRT_APP_FORMAT_MCUBOOT
select IMXRT_HAVE_OTA_PARTITION
depends on EXPERIMENTAL
---help---
- The MCUboot support of loading the firmware images.
+ The MCUboot support of loading the firmware images.
Review Comment:
done, good catch :)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org