cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F105 in-application programming restrictions?

andy_jones62
Associate
Posted on February 17, 2015 at 13:17

I'm looking at the feasibility of performing in-application programming for an existing product that has an external CAN interface, but which, as far as I can tell, cannot use the integral system boot loader, (as CAN1 is used, not CAN2). In normal operation, to support CAN, HSE is used, which is compatible with PM0075 statement concerning the system boot loader:

''The USART peripheral operates with the internal 8 MHz oscillator (HSI), however the CAN and USB OTG FS can only function if an external 8 MHz, 14.7456 MHz or 25 MHz clock (HSE) is present.''

However, PM0075 also states that

''For write and erase operations on the Flash memory (write/erase), the internal RC oscillator (HSI) must be ON. The Flash memory can be programmed and erased using in-circuit programming and inapplication programming.''

which seems to rule out servicing the CAN interface while performing Flash erase/write operations, unless I'm misinterpretting the rules. Is this statement correct? Does this mean that an in-application reprogramming function has to select HSE to download the data via CAN for reprogramming, and then switch to HSI for the duration of Flash programming?

For anyone else reading around the subject, note that PM0075 references AN2662, but this became obsolete when AN2606 was updated in March 2010.

#stm32f #eeprom #rewrite #flash
2 REPLIES 2
Posted on February 17, 2015 at 14:50

The more reasonable translation is that some of the internal timing is derived from the HSI, so that must be running, but you don't have to RUN the processor from that clock, but rather the HSE+PLL.

The System Loader benchmarks the HSE vs HSI/LSI to determine which crystal is being used.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
andy_jones62
Associate
Posted on February 18, 2015 at 12:53

That's what I was hoping, and having found the Clock Tree (figure 8 of RM0008- DocID 13902 Rev 15), I can see that is the case.  Thanks for the additional info about the system boot loader.  Having benchmarked the clock, does the System Loader then need to alter HSITRIM or HSICAL at all, or are the standard settings found to be satisfactory for Flash programming, if , say HSE was from an 8MHz crystal?