Write to TIMx break and dead-time register
Hello everyone!
During programming for the MCU STM32G431CbTx, I want to write a function to change the value of the "Break filter" bit for "Tim_BRK" as follows:
static inline void mcu_protection_ov_enable_filter(){
uint32_t tmpbdtr = READ_REG(TIM1->BDTR);
tmpbdtr = (tmpbdtr & 0xFFF0FFFFU) | LL_TIM_BREAK_FILTER_FDIV2_N8;
WRITE_REG(TIM1->BDTR,tmpbdtr);
}

However, after checking, the value of the BKF bit remains unchanged, while the LOCK bit is set to 00: LOCK OFF - No bit is write-protected. Meanwhile, I can use a similar method to change the DTG (deadtime) bit.
Who can support me?
Thanks,
Locnv.
Edited to apply code formatting - please see How to insert source code for future reference.
