Skip to content

Commit

Permalink
Merge pull request #10875 from hydra/bf-fix-bitbang-dshot
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeller committed Sep 6, 2021
1 parent 413edde commit e3c2445
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/main/drivers/dshot_bitbang.c
Expand Up @@ -548,22 +548,21 @@ static void bbUpdateComplete(void)
}
}

#ifdef USE_DSHOT_TELEMETRY
for (int i = 0; i < usedMotorPorts; i++) {
bbPort_t *bbPort = &bbPorts[i];

#ifdef USE_DSHOT_TELEMETRY
if (useDshotTelemetry) {
if (bbPort->direction == DSHOT_BITBANG_DIRECTION_INPUT) {
bbPort->inputActive = false;
bbSwitchToOutput(bbPort);
}


bbDMA_Cmd(bbPort, ENABLE);
}
}
#endif

bbDMA_Cmd(bbPort, ENABLE);
}

lastSendUs = micros();
for (int i = 0; i < usedMotorPacers; i++) {
bbPacer_t *bbPacer = &bbPacers[i];
Expand Down
2 changes: 1 addition & 1 deletion src/main/drivers/memprot_stm32h7xx.c
Expand Up @@ -45,6 +45,7 @@ mpuRegion_t mpuRegions[] = {
.bufferable = MPU_ACCESS_BUFFERABLE,
},
#endif
#ifdef USE_DMA_RAM
{
// DMA transmit buffer in D2 SRAM1
// Reading needs cache coherence operation
Expand All @@ -57,7 +58,6 @@ mpuRegion_t mpuRegions[] = {
.cacheable = MPU_ACCESS_CACHEABLE,
.bufferable = MPU_ACCESS_NOT_BUFFERABLE,
},
#ifdef USE_SDCARD_SDIO
{
// A region in AXI RAM accessible from SDIO internal DMA
.start = (uint32_t)&dmarwaxi_start,
Expand Down

0 comments on commit e3c2445

Please sign in to comment.