Posted on January 03, 2018 at 23:14The HAL_TIM_PWM_Stop_DMA() it's not a Cube thing, but a HAL thing,
Cube is the library, containing both HAL and LL. The code generator is called (confusingly) CubeMX. But that's just terminology which does not really matter.
As I've said and you've confirmed, the function in question disables the
DMA triggering
in timer (by clearing the respective bit in TIMx_DIER) but does not disable the
DMA channel
(by clearing DMA_SxCR.EN). Only after DMA channel is disabled, the memory address register can be written - see
DMA stream x memory 0 address register (DMA_SxM0AR) subchapter of DMA chapter in RM.
I don't know about the double buffer you say, where I can read more?
Reference manual for your SMT32, DMA chapter, Double buffer mode subchapter.
JW