yangsong8-a1 opened a new pull request, #22159:
URL: https://github.com/apache/nuttx/pull/22159

   ## Summary
   
   `tlsr82_uart_dma_txavail()` waited on `txdmasem` for the previous TX DMA 
transfer.  The serial upper half calls `dmatxavail()` with `uart_spinlock()` 
held (since #21746), and from interrupt context through `uart_putchars()`, 
where it must not block.
   
   Use `nxsem_trywait()` and return when the DMA is busy.  The TX done 
interrupt now calls `tlsr82_uart_dma_txavail()` after releasing `txdmasem`, so 
data written while the DMA was busy is still sent.
   
   ## Impact
   
   tlsr82 with `CONFIG_TLSR82_UART0_TXDMA` only.  No in-tree defconfig enables 
it.
   
   ## Testing
   
   `tc32-elf-gcc` is not available to me.  I configured `tlsr8278adk80d:nsh` 
with `CONFIG_TLSR82_UART0_TXDMA=y` and checked `tlsr82_serial.c` with 
`arm-none-eabi-gcc -fsyntax-only` and the flags of the real build (GNU Arm 
Embedded Toolchain 10.3-2021.10).  The only diagnostic is a warning that master 
has too (`tlsr82_dma_interrupt` declared but not defined).
   
   Not tested: a real build with tc32, any hardware.
   


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

Reply via email to