Closed khevessy closed 1 year ago
Hi @Irisbus,
It is indeed not accurate to call LL_TIM_OC_GetMode
on non-output channel, the function description is actually mentioning this.
Hence, the documented returned values are specifying the output compare mode when channel is configured as output. It is therefore left to the user to provide the correct parameters to the function in order to get right results.
With regards,
I do not know if this is a bug, but this function https://github.com/STMicroelectronics/STM32CubeH7/blob/0c3a06c18bd2a87b006a84f997f2b0b56d97a113/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_tim.h#L2221-L2226 might return something else than the documented return values that are mentioned in its header. It will happen if field CCxS is different from zero (channel is not output). Maybe it is wrong to call this function on non-output channel but the function header should mention that the return value will differ.