You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the reference manual RM0091 Rev 10 "Table 30. DMA requests for each channel on STM32F07x devices", Note 2:
DMA request mapped on this DMA channel only if the corresponding remapping bit is set in SYSCFG configuration register 1 (SYSCFG_CFGR1).
This bit is not set. After setting SYSCFG_CFGR1.I2C1_DMA_RMP = 1 it works.
Tested with embassy-stm32 0.1.0.
EDIT: This seems to be an issue for all STM32 devices which need remapping bits set or cleared in SYSCFG_CFGR1 to work with specific DMA channels. This affects at least STM32F0 and STM32F3.
I made this quick workaround for STM32F072 in my code:
const SYSCFG_CFGR1: *mut u32 = 0x40010000 as *mut u32; // address from datasheet Table 12 "Peripheral register boundary addresses"
...
unsafe {
// remap I2C1 DMA to channel 6 and 7
SYSCFG_CFGR1.write_volatile(SYSCFG_CFGR1.read_volatile() | 1 << 27);
}