Question
STM32F072 bootloader ''limiitation''.....
Posted on January 23, 2015 at 15:58
Hi,
I think I've found a ''bug'' in the bootloader. AN2606 documents for '051 chips on page 58 that: [quote] When the user application configures a value of HSI TRIM bits (in RCC_CR register) and then jumps to the bootloader, the HSITRIM value is reset to its default value (0) at bootloader startup[/quote]The same thing seems to happen for the 072 bootloader. But that isn't the problem... The problem is that the HSI TRIM default is not 0 but 16. This results in the CPU running about 40kHz * 16 = 640 kHz slower than the 1% calibrated 8MHz..... Apparently ''autobauding'' for the serial ports and ''crystalless USB'' end up compensating for this so that nobody has noticed that the bootloader runs at a multiple of 7.3MHz instead of 8MHz. All this isn't really a problem until you let the bootloader jump to your application and then end up with baud rates that are off by ''too much''. P.S. I checked the datasheet for the '51 and it too has ''16'' as the default HSITRIM. #nmp