Skip to content

Commit

Permalink
ports/stm32/spi: Disable WFI for H7.
Browse files Browse the repository at this point in the history
- See DM00257543 2.2.5
  • Loading branch information
iabdalkader committed Nov 30, 2024
1 parent 4f414d9 commit 879162f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ports/stm32/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,14 @@ static HAL_StatusTypeDef spi_wait_dma_finished(const spi_t *spi, uint32_t t_star
enable_irq(irq_state);
return HAL_OK;
}
// See DM00257543 2.2.5
// The DTCM-RAM is not accessible in read during Sleep mode (when the CPU clock is
// gated). When a read access to the DTCM-RAM is performed by an AHB bus master
// (that are the DMAs) while the CPU is in sleep mode (CPU clock is gated), the
// data is not transmitted to the AHB bus and the AHB master reads 0x0000_0000.
#if !defined(STM32F7)
__WFI();
#endif
enable_irq(irq_state);
if (HAL_GetTick() - t_start >= timeout) {
return HAL_TIMEOUT;
Expand Down

0 comments on commit 879162f

Please sign in to comment.