Question
Peripheral reset timings
Hello,
I have a question regarding the peripheral reset registers.
For the G070 device, in the RM0454, section 5.2.16, it is specified that the clock enable of a peripheral takes 2 cycles to prevent glitches. Fine.
However, how do you experts use the reset registers ? Let's say that you want to reset the CRC peripheral.
I'm doing it like so for the moment:
RCC->AHBENR |= RCC_AHBENR_CRCEN; // Turn ON CRC peripheral clock
delay_us(5);
RCC->AHBRSTR = RCC_AHBRSTR_CRCRST; // Reset peripheral
delay_us(5);
RCC->AHBRSTR = 0;
delay_us(5);But I don't know if any delays are indeed needed or not here. Any thought on this ?
Best regards,
Kraal
