ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

ChibiOS: UARTDriver: init dma buffer

Open pshavoc opened this issue 9 months ago • 5 comments

this change initializes the UART DMA buffers properly and also respects the OPTION_NODMA_RX and OPTION_NODMA_TX options.

pshavoc avatar May 09 '25 16:05 pshavoc

Thanks for the contribution. Are you seeing an issue caused by this? ArduPilot zeros memory on allocation so member variables are assumed initialized.

tpwrules avatar May 10 '25 03:05 tpwrules

I was finding that the driver was always using DMA for receiving data, even when I set the OPTION_NODMA_RX option flag. I traced this down to this line and found that rx_dma_enabled was always true. I then added the code to initialize rx_bounce_buf to nullptr and that fixed the problem.

pshavoc avatar May 12 '25 14:05 pshavoc

What board and compiler?

tpwrules avatar May 12 '25 15:05 tpwrules

CubeOrangePlus, arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)

pshavoc avatar May 12 '25 15:05 pshavoc

@peterbarker ok removed now

pshavoc avatar May 29 '25 16:05 pshavoc

Ping @andyp1per - we're down to the single logical change now, and I think you're rather more qualified on this one than I am :-)

peterbarker avatar Jun 07 '25 09:06 peterbarker

This is included in 4.6.2-beta1

rmackay9 avatar Jun 24 '25 10:06 rmackay9