2024-11-11 11:43 AM
I tried the following code in a STM32F107:
RCC->AHBENR = RCC->AHBENR | RCC_APB2ENR_IOPBEN_Msk| RCC_APB2ENR_IOPDEN_Msk;
and
RCC->AHBENR = RCC->AHBENR | 0x00000008 | 0x00000020;
When I display RCC->AHBENR, it always shows 0001C014.
I expected to see 0x0001C03C.
I found this because Ethernet never finished resetting.
Solved! Go to Solution.
2024-11-11 12:36 PM
AHB != APB2, different busses
RCC->APB2ENR = RCC->APB2ENR | RCC_APB2ENR_IOPBEN_Msk| RCC_APB2ENR_IOPDEN_Msk;
2024-11-11 12:14 PM
Hello. Could you try this RCC->APB2ENR|=(1<<5)|(1<<3);
2024-11-11 12:26 PM
Tried RCC->APB2ENR|=(1<<5)|(1<<3);
Still shows 0001C014.
2024-11-11 12:36 PM
AHB != APB2, different busses
RCC->APB2ENR = RCC->APB2ENR | RCC_APB2ENR_IOPBEN_Msk| RCC_APB2ENR_IOPDEN_Msk;
2024-11-11 12:37 PM
Sure you're reading RCC->APB2ENR, and not RCC->AHBENR again? Would be odd for them both to read as 0x0001C014
2024-11-11 12:44 PM
My BAD.
I had been checking the Ethernet clocks.
Thanks for pointing out my error.
Unfortunately, I now have no idea why the Ethernet reset is not working. It times out.