STM32H7 Flash RCC Problem
Hi,
When I was using the STM32H743ZI chip, I set the system frequency of the chip to 160 MHz. Only enable the ICache, do not enable the DCache and the MPU.According to the prompt from CubeMX, the maximum peripheral clock is 240 MHz. Therefore, I configured HPRE as 1, as shown in the following figure:

During the test, I found that if I disabled the ICache, LWIP was unable to obtain the IP address.If I configure HPRE as 2, LWIP can successfully obtain the IP.Using Wireshark to capture the data on the network, no DHCP protocol was found. That is to say, the Ethernet data was not sent out. However, during the debugging process, the Ethernet data was sent out through the sending function.
Using a logic analyzer to test the data of the MDIO bus under the two configurations, I found that the MDIO versions automatically parsed by the logic analyzer were different. However, the values of all the registers of the PHY were the same in both cases, except for the status register. The test results of the logic analyzer are as shown in the following figure:


Additionally, when the system clock frequency is 160 MHz, even after adding some code, LWIP may still fail to obtain the IP address. However, when the system clock frequency is 320 MHz, after adding the same code, LWIP can successfully obtain the IP address. When the system clock is 160 MHz, if the value of Flash Latency is modified to FLASH_LATENCY_2, LWIP can successfully obtain the IP address, as shown in the following figure:

When the Flash Latency is set to FLASH_LATENCY_2, the system clock frequency is increased from 160 MHz to 320 MHz, and LWIP operates normally.
Based on the test results, after using the ICache, there were issues with the instructions read from the Flash, but not all the Flash devices had problems. If the ICache was turned off, all functions were normal.
