You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Michal Lenc <mi...@seznam.cz> on 2022/03/06 22:37:37 UTC
Serial RX DMA polling
Hi all,
serial drivers use periodic polling for DMA receive callback to ensure the
reception of bytes that were not taken by DMA interrupt. There are functions
like stm32_serial_dma_poll(void) that should be periodically called from a
timer for this purpose. However I haven´t been able to find any "example"
usage in the NuttX mainline.
My first thoughts were to implement the timer directly to the driver (like
in ADC drivers) but stm32_serial_dma_poll(void) is not private so I guess it
is not supposed to be called from stm32_serial.c but rather from board level
section? Is there any consensus on how to use the periodic polling? Thanks.
Best regards,
Michal Lenc
RE: Serial RX DMA polling
Posted by Michal Lenc <mi...@seznam.cz>.
Hi David,
> https://github.com/PX4/PX4-Autopilot/blob/master/boards/px4/fmu-v5x/src/
init.cpp#L243-L247
that´s exactly what I was looking for, thanks!
Best regards,
Michal Lenc
---------- Původní e-mail ----------
Od: David Sidrane <da...@nscdg.com>
Komu: dev@nuttx.apache.org
Datum: 7. 3. 2022 15:20:08
Předmět: RE: Serial RX DMA polling
"Hi Michal,
> rather from board level section
Yes
Have a look at this example.
https://github.com/PX4/PX4-Autopilot/blob/master/boards/px4/fmu-v5x/src/
init.cpp#L243-L247
-----Original Message-----
From: Michal Lenc <mi...@seznam.cz>
Sent: Sunday, March 6, 2022 2:38 PM
To: dev@nuttx.apache.org
Subject: Serial RX DMA polling
Hi all,
serial drivers use periodic polling for DMA receive callback to ensure the
reception of bytes that were not taken by DMA interrupt. There are functions
like stm32_serial_dma_poll(void) that should be periodically called from a
timer for this purpose. However I haven´t been able to find any "example"
usage in the NuttX mainline.
My first thoughts were to implement the timer directly to the driver (like
in ADC drivers) but stm32_serial_dma_poll(void) is not private so I guess it
is not supposed to be called from stm32_serial.c but rather from board level
section? Is there any consensus on how to use the periodic polling? Thanks.
Best regards,
Michal Lenc
"
RE: Serial RX DMA polling
Posted by David Sidrane <da...@nscdg.com>.
Hi Michal,
> rather from board level section
Yes
Have a look at this example.
https://github.com/PX4/PX4-Autopilot/blob/master/boards/px4/fmu-v5x/src/init.cpp#L243-L247
-----Original Message-----
From: Michal Lenc <mi...@seznam.cz>
Sent: Sunday, March 6, 2022 2:38 PM
To: dev@nuttx.apache.org
Subject: Serial RX DMA polling
Hi all,
serial drivers use periodic polling for DMA receive callback to ensure the
reception of bytes that were not taken by DMA interrupt. There are functions
like stm32_serial_dma_poll(void) that should be periodically called from a
timer for this purpose. However I haven´t been able to find any "example"
usage in the NuttX mainline.
My first thoughts were to implement the timer directly to the driver (like
in ADC drivers) but stm32_serial_dma_poll(void) is not private so I guess it
is not supposed to be called from stm32_serial.c but rather from board level
section? Is there any consensus on how to use the periodic polling? Thanks.
Best regards,
Michal Lenc