danielappiagyei-bc commented on code in PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#discussion_r1370809227
##########
arch/arm/src/imxrt/imxrt_serial.c:
##########
@@ -1373,6 +1373,7 @@ static inline void imxrt_serialout(struct imxrt_uart_s
*priv,
static int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
{
int dmaresidual = imxrt_dmach_getcount(priv->rxdma);
+ DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE);
Review Comment:
I've tested by adding a DEBUGASSERT and can confirm that it is possible to
get 0 for `dmaresidual`. It took awhile though, at _least_ 500 seconds,
probably closer to a 1000 (I wasn't present after 500s but my debugger caught
the reset exception). Please add the conditional that I did in my branch to
all affected files: https://github.com/apache/nuttx/pull/10911/files
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]