At the end of the program, I always think about the convenience of updating in the future. In Application Programming (In ApplicaTIon Programming), I boot the MCU to write data or modify the program through Bootload. The following describes the IAP method of the STM32F030. Unlike the STM32F1 family, F0 has no interrupt vector offset register. So add the following code at the beginning of the app. Why did you do this? ?
You can see that the function uses a for loop to copy the vector table to the base address of the 0 x 20000000 SRAM, which maps the vector table from Flash to SRAM. Therefore, when setting the Flash offset address in MDK, set the SRAM offset address at the same time. Screenshot below
/ / APP program at the beginning of the IAP_Set (void) function
There is a Target dialog box to see that the APP program has Flash address 0x8001400 to start execution. Sram data has 0x20000c0 out of storage.
After talking about the APP code to deal with matters, let's talk about the IAP code writing.
After the program is updated, execute the above jump function to execute the updated APP code. About how to pass the APP code (bin file) to the MCU Flash through the IAP, you can transfer the packet through the serial port. Because F0Flash is 1K for one page, I use 1K cache here, that is, I receive a Flash write operation on the serial port 1K data volume, transfer to the last less than 1K, fill in 0XFF and write according to 1K data. Write the flash code as follows
About how IAP receives the serial port data, I use the XCOM V2.0 serial port debugging assistant of the punctual atom to transmit 128 bytes of data each time through the protocol transmission, and execute the IAP serial port data reception.
Low Voltage Energy Storage
LFP 5-10kWh / LV
LiFePO4 BATTERY, 51.2V 100/200Ah
LFP5-10kWh/LV is the latest Wall Mounted Lithium Battery for Home Energy Storage system. It is based on lithium iron phosphate batteries and equipped with customized BMS. 6000+ high cycle times, long service life, stylish appearance design, make it popular with many customers, and suitable for daily charging and discharging application scenarios.
Low Voltage Energy Storage LFP2400/LFP5000
LFP2400, LFP5000 are hot-selling Rack Mounted Lithium Batteries provided by Sunket with our abundant experience for Home Energy Storage. It` s long life character, high energy and power density in the industry, fashionable design, easiness of installation and expansion, all reflects the real requirements of end users and strongest technical capability of Sunket.
T200/T500
Portable Power Bank
Portable power bank is the definition of a new way of life. It adopts high-safety lithium iron phosphate battery and integrates various power ports.
It is suitable for the operation of lighting, small household appliances, mobile phones, cameras, notebook computers, vehicle electrical appliances, automotive emergency start, medical emergency equipment and other products in off-grid or power failure scenarios such as indoor backup, outdoor activities, car self-driving tours, and emergency rescue.
High Voltage Energy Storage 30kW/92kWh
·Small size, high integration
·User-defined operating mode is easy to set
·Support on-grid and off-grid switching
·Installation and access points for supporting microgrid energy devices
·Comprehensive energy management, real-time dynamic operation monitoring
·AI cloud computing data processing, intelligent management and control
Battery Energy Storage System, Battery Energy, Lithium Battery, Lithium Ion Battery, Pylontech Battery
Wuxi Sunket New Energy Technology Co.,Ltd , https://www.sunketsolar.com