|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Include dependency graph for dshot_rpmCapture.c:Go to the source code of this file.
Macros | |
| #define | SWTICH_TO_CAPTURE_BASE_TIMOUT 28U |
| #define | nullptr NULL |
Functions | |
| static void | startCapture (DshotRpmCapture *drcp) |
| start the DMA capture | |
| static void | stopCapture (DshotRpmCapture *drcp) |
| stop the DMA capture | |
| static void | initCache (DshotRpmCapture *drcp) |
| build dma and timer registers cache | |
| static uint32_t | processErpsDmaBuffer (const uint16_t *capture, size_t dmaLen) |
| convert DMA buffer full of pulse length into raw ERPS frame | |
| static void | buildDmaConfig (DshotRpmCapture *drcp) |
| build dma configuration structure | |
| static void | dmaErrCb (DMADriver *dmad, dmaerrormask_t em) |
| dma error ISR : | |
| static void | gptCb (GPTDriver *gptd) |
| dma timeout ISR : | |
| void | dshotRpmCaptureStart (DshotRpmCapture *drcp, const DshotRpmCaptureConfig *cfg, stm32_tim_t *timer) |
| Configures and activates the DSHOT ERPS CAPTURE driver. | |
| void | dshotRpmCaptureStop (DshotRpmCapture *drcp) |
| stop the the DSHOT ERPS CAPTURE driver. | |
| void | dshotRpmCatchErps (DshotRpmCapture *drcp) |
| capture the DSHOT ERPS frame(s) : one frame for each DSHOT_CHANNELS | |
Variables | ||
| static const float | TIM_FREQ_MHZ = (STM32_SYSCLK / 1e6d) | |
| static const float | bit1t_us = TIM_FREQ_MHZ * 6.67d * 4 / 5 | |
| static const float | speed_factor = DSHOT_SPEED / 150 | |
| static const uint32_t | ERPS_BIT1_DUTY = bit1t_us / speed_factor | |
| static const uint32_t | TIM_PRESCALER = 1U | |
| struct { | ||
| uint32_t | active | |
| uint32_t | dier | |
| } | activeDier [4] | |
| static const TimICConfig | timicCfgSkel | |
| static const GPTConfig | gptCfg | |
Definition at line 49 of file dshot_rpmCapture.c.
Definition at line 31 of file dshot_rpmCapture.c.
|
static |
build dma configuration structure
| [in] | drcp | pointer to the DshotRpmCapture object |
Definition at line 250 of file dshot_rpmCapture.c.
References DMA_DIR_P2M, DMA_ONESHOT, dmaErrCb(), DSHOT_CHANNELS, foo, and DMAConfig::stream.
Referenced by initCache().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
dma error ISR :
| [in] | drcp | pointer to the DMADriver |
| [in] | em | error mask |
Definition at line 397 of file dshot_rpmCapture.c.
References foo.
Referenced by buildDmaConfig().
Here is the caller graph for this function:| void dshotRpmCaptureStart | ( | DshotRpmCapture * | drcp, |
| const DshotRpmCaptureConfig * | cfg, | ||
| stm32_tim_t * | timer | ||
| ) |
Configures and activates the DSHOT ERPS CAPTURE driver.
| [in] | drcp | pointer to the DshotRpmCapture object |
| [in] | cfg | pointer to the DshotRpmCaptureConfig object. |
| [in] | timer | pointer to the underlying timer (same one used to output control frame) @api |
Definition at line 108 of file dshot_rpmCapture.c.
References foo, initCache(), TimICConfig::timer, and timicCfgSkel.
Referenced by dshotStart().
Here is the call graph for this function:
Here is the caller graph for this function:| void dshotRpmCaptureStop | ( | DshotRpmCapture * | drcp | ) |
stop the the DSHOT ERPS CAPTURE driver.
| [in] | drcp | pointer to the DshotRpmCapture object @api |
Definition at line 124 of file dshot_rpmCapture.c.
References foo, and stopCapture().
Referenced by initCache().
Here is the call graph for this function:
Here is the caller graph for this function:| void dshotRpmCatchErps | ( | DshotRpmCapture * | drcp | ) |
capture the DSHOT ERPS frame(s) : one frame for each DSHOT_CHANNELS
| [in] | drcp | pointer to the DshotRpmCapture object |
Definition at line 149 of file dshot_rpmCapture.c.
References dmaGetTransactionCounter(), dmaStartTransfert(), dmaStopTransfertI(), DSHOT_CHANNELS, DSHOT_DMA_DATA_LEN, DSHOT_DMA_EXTRADATA_LEN, DSHOT_SPEED, foo, msg, processErpsDmaBuffer(), startCapture(), stopCapture(), SWTICH_TO_CAPTURE_BASE_TIMOUT, and timeoutUs.
Referenced by dshotSendFrame().
Here is the call graph for this function:
Here is the caller graph for this function:dma timeout ISR :
| [in] | gptd | pointer to the GPTDriver that trigger the timeout |
Definition at line 414 of file dshot_rpmCapture.c.
References foo.
|
static |
build dma and timer registers cache
| [in] | drcp | pointer to the DshotRpmCapture object |
Definition at line 297 of file dshot_rpmCapture.c.
References buildDmaConfig(), dmaObjectInit(), dmaStart(), DSHOT_CHANNELS, dshotRpmCaptureStop(), foo, DshotRpmCaptureConfig::gptd, timerDmaCache_cache(), timIcObjectInit(), and timIcStart().
Referenced by dshotRpmCaptureStart().
Here is the call graph for this function:
Here is the caller graph for this function:convert DMA buffer full of pulse length into raw ERPS frame
| [in] | drcp | pointer to the DshotRpmCapture object |
Definition at line 347 of file dshot_rpmCapture.c.
References ERPS_BIT1_DUTY, and foo.
Referenced by dshotRpmCatchErps().
Here is the caller graph for this function:
|
static |
start the DMA capture
| [in] | drcp | pointer to the DshotRpmCapture object |
Definition at line 320 of file dshot_rpmCapture.c.
References foo, gptCfg, timerDmaCache_restore(), and timIcStartCapture().
Referenced by dshotRpmCatchErps().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
stop the DMA capture
| [in] | drcp | pointer to the DshotRpmCapture object |
Definition at line 333 of file dshot_rpmCapture.c.
References foo, timIcRccDisable(), and timIcStopCapture().
Referenced by dshotRpmCaptureStop(), and dshotRpmCatchErps().
Here is the call graph for this function:
Here is the caller graph for this function:| const struct { ... } activeDier[4] |
|
static |
Definition at line 17 of file dshot_rpmCapture.c.
|
static |
Definition at line 20 of file dshot_rpmCapture.c.
Referenced by processErpsDmaBuffer().
Definition at line 92 of file dshot_rpmCapture.c.
Referenced by startCapture().
|
static |
Definition at line 18 of file dshot_rpmCapture.c.
|
static |
Definition at line 15 of file dshot_rpmCapture.c.
Definition at line 21 of file dshot_rpmCapture.c.
|
static |
Definition at line 68 of file dshot_rpmCapture.c.
Referenced by dshotRpmCaptureStart().