Check the ROM bootloader version first. ST application note AN2606 describes how STM32F070xB bootloader V10.2 sets HSITRIM to zero rather than the default value of 16 at startup. That can introduce an error when the ROM measures the crystal frequency. For this version, ST suggests the smallest supported value, 4 MHz, for better results. The same table says V10.3 fixes the clock configuration to HSI at 8 MHz. A 24 MHz Diodes FL-series crystal that meets the verified board requirement should not be blamed merely because the V10.2 bootloader misidentifies its clock.
Separate physical frequency from the ROM decision
For service, log the full MCU code, ROM version, boot interface and reference source, then measure the actual clock independently. A 24 MHz observation does not show that an inaccurate internal measurement reference classified it correctly. Conversely, a wrong ROM decision is not a measurement of the component frequency. If the physical frequency is wrong, investigate the crystal, load and assembly. If physical frequency is valid and failures group by ROM version, address the boot path and production mix first.
Qualify the actual production update path
If evaluating ST's suggested 4 MHz path, use an approved trial board and review crystal loading, the application clock tree and peripheral timing. Do not approve a product merely by replacing a 24 MHz component that is still required by other functions. Another option is to validate a suitable bootloader revision or an approved application bootloader. Record ROM update testing, normal application operation and crystal acceptance separately. A working serial link or one USB enumeration does not qualify every update path.
Related selection guide: MERLIN Crystal Timing: LPC11U24 Runs with a 16 MHz Crystal: Why Doesn't USB Programming Show a Drive?
Resource link: https://www.mecxtal.com.cn/en/handbook/new-0775.html
