SensorTile.box firmware OTA function restore · Revision history Table 1. Document revision history...
Transcript of SensorTile.box firmware OTA function restore · Revision history Table 1. Document revision history...
Features• Restores FOTA functionality deleted by custom firmware.• Requires the following:
– STEVAL-MKSBOX1V1 (SensorTile.box) board– Mini USB B to USB-B cable– Micro USB-B to USB-B cable– ST-LINK/V2 programmer with correct driver installed on PC– STM32 ST-LINK Utility (STSW-LINK004) software installed on PC– Smartphone with ST BLE Sensor app installed– JTAG adapter board V1.0: adapter from JTAG20 to STDC14 connector– Flat cable to connect JTAG adapter to SensorTile.box– BLEFOTA_BL.bin firmware file
DescriptionThe STEVAL-MKSBOX1V1 (SensorTile.box) is a ready-to-use wireless IoT andwearable sensor box kit designed to help simplify app development based on remotemotion and environmental sensor data.
The kit firmware provides a range of development modes: from Entry Mode fordevelopers with little or no programming skills, to Pro Mode where users can loadcustom firmware on the SensorTile.box STM32 microcontroller.
The STSW-MKSBOX1_BL firmware allows you to restore the ability to upgradefirmware over the air (FOTA) in the event that FOTA functionality is overwritten ordeleted due to a custom firmware upload.
Product summary
Firmware OTA restorefor SensorTile.box
STSW-MKSBOX1_BL
Wireless multi sensordevelopment kit forIoT and wearablesensor applications
STEVAL-MKSBOX1V1
ST-LINK/V2 in-circuitdebugger/programmerfor STM8 and STM32
ST-LINK/V2
STM32 ST-LINK utility STSW-LINK004
ST-LINK, ST-LINK/V2,ST-LINK/V2-1,STLINK-V3 boardsfirmware upgrade
STSW-LINK007
ST-LINK/V2-1 USBdriver on WindowsVista, 7 and 8
STSW-LINK008
ST-LINK, ST-LINK/V2,ST-LINK/V2-1 USBdriver signed forWindows7,Windows8,Windows10
STSW-LINK009
SensorTile.box firmware OTA function restore
STSW-MKSBOX1_BL
Data brief
DB4001 - Rev 3 - December 2019For further information contact your local STMicroelectronics sales office.
www.st.com
Product summary
Applications
IoT for SmartThings
IoT for SmartHome and City
Wearable
STSW-MKSBOX1_BL
DB4001 - Rev 3 page 2/15
1 FOTA restore procedure
1.1 Connect the hardware
Step 1. Connect the JTAG adapter to the ST-LINK/V2 programmer and debugger.
Step 2. Connect the flat cable between the ST-LINK programmer/debugger and SensorTile.box.Pin 1 is labeled on both parts and should be connected with the cable pin 1 (black wire).
Step 3. Supply USB power (PC or wall charger) to the SensorTile.cox board via a microUSB-B cable.
Step 4. Connect the ST-LINK/V2 to the PC via USB cable.
Figure 1. Connecting the SensorTile.box, JTAG adapter and ST-LINK programmer1. PC-USB2. ST-LINK/V23. JTAG adapter4. Flat cable5. SensorTile.box6. DC power USB
12
3
4
56
1.2 Run the STM32 ST-LINK Utility software
You can perform this step after the hardware components are connected and powered appropriately.
STSW-MKSBOX1_BLFOTA restore procedure
DB4001 - Rev 3 page 3/15
Step 1. Run the STM32 ST-LINK Utility software and select the [connect to target] icon.The software displays the current binary file flashed in the STM32 microcontroller of the SensorTile.boxboard.
Figure 2. STM32 ST-LINK Utility software connection with target SensorTile.box1. connect to target icon2. current binary file flashed on MCU
2
1
STSW-MKSBOX1_BLRun the STM32 ST-LINK Utility software
DB4001 - Rev 3 page 4/15
Step 2. Select [Target]>[Erase chip] to erase the entire STM32 flash memory.This step is necessary to avoid any issues when the new binary file is flashed.
Figure 3. STM32 ST-LINK Utility software erase SensorTile.box flash
STSW-MKSBOX1_BLRun the STM32 ST-LINK Utility software
DB4001 - Rev 3 page 5/15
Step 3. Select [File]>[Open File] and select the BLEFOTA_BL.bin file on your PC.This bootloader file enables FOTA via Bluetooth.
Figure 4. STM32 ST-LINK Utility software open FOTA via BLE bootloader file
STSW-MKSBOX1_BLRun the STM32 ST-LINK Utility software
DB4001 - Rev 3 page 6/15
Step 4. Select [Target]>[Program]Ensure that the start address is 0x08000000.
Figure 5. STM32 ST-LINK Utility software load FOTA via BLE file1. Start address
1
Step 5. Select [Start].
Once the flashing procedure is complete, the SensorTile.box can receive the latest firmware available from ST viaa Bluetooth low energy connection with a smartphone.
1.3 Run the ST BLE Sensor smartphone app
You can perform this step after the BLEFOTA_BL.bin bootloader file is loaded on the SensorTile.box STM32microcontroller.
STSW-MKSBOX1_BLRun the ST BLE Sensor smartphone app
DB4001 - Rev 3 page 7/15
Step 1. Run the ST BLE Sensor smartphone app and delete any old Bluetooth pairings with the SensorTile.boxboard.This helps avoid any communication issues between the smartphone application and the board.
Figure 6. ST BLE Sensor smartphone app
STSW-MKSBOX1_BLRun the ST BLE Sensor smartphone app
DB4001 - Rev 3 page 8/15
Step 2. Select [CONNECT TO A DEVICE].The app identifies the SensorTile.box board running BLEFOTA_BL.bin as ST.BOOT
Figure 7. SensorTile.box with FOTA bootloader listing in ST BLE Sensor app
STSW-MKSBOX1_BLRun the ST BLE Sensor smartphone app
DB4001 - Rev 3 page 9/15
Step 3. Select [ST.BOOT] from the Device List.The ST BLE Sensor app retrieves the latest firmware version available for the SensorTile.box.If is the first time of device's phone connecting, is needed a Bluetooth connection pairing code: 123456
Figure 8. New firmware availability for SensorTile.box
STSW-MKSBOX1_BLRun the ST BLE Sensor smartphone app
DB4001 - Rev 3 page 10/15
Step 4. Select [START FIRMWARE UPGRADE] followed by the download icon.
Figure 9. Download latest SensorTile.box firmware1. Download icon
1
The app downloads the latest online version of the firmware onto the SensorTile.box STM32 MCU flash memory.The ST BLE Sensor app now identifies the board as TileBox.
STSW-MKSBOX1_BLRun the ST BLE Sensor smartphone app
DB4001 - Rev 3 page 11/15
Figure 10. STM32 ST-LINK Utility software load FOTA via BLE file
STSW-MKSBOX1_BLRun the ST BLE Sensor smartphone app
DB4001 - Rev 3 page 12/15
2 Schematic diagrams
Figure 11. STSW-MKSBOX1_BL schematic diagram
2
2
17
6JTAG_3JTAG_5JTAG_7JTAG_9JTAG_11JTAG_13JTAG_15JTAG_17JTAG_19
14
7
JTAG_3JTAG_5JTAG_7JTAG_9
JTAG_11JTAG_13JTAG_15JTAG_17JTAG_19
JTAG_2JTAG_4JTAG_6JTAG_8JTAG_10JTAG_12JTAG_14JTAG_16JTAG_18JTAG_20
JTAG_1
10
19
2
654321
7
16
7
SWDIOSWCLK
NRST
VDD
Target_UART_RXTarget_UART_TX
14
JP2
MHDR2X7
R1 DNM0R
TDOTDI
5
17
1
111412
12
10
19
4
1
R20R
DNM
JTAG_2JTAG_4JTAG_6JTAG_8JTAG_10JTAG_12JTAG_14JTAG_16JTAG_18JTAG_20
GND
0RR4
GND
12
21
JP5
Header 2
R3 DNM
8
15
5
20
JP3
Header 10X2
JTAG_1
10
STDC143
1816
18
4
6
1
3
3
0R
13
9
1415
GND
13
8
11
6
13
20
JP1
Header 10X2
9
2
GND
JP4
Header 6
GND
9
SWDIONRST
SWCLKVDD
8
BT1
115
DB
4001 - Rev 3
page 13/15
STSW-M
KSB
OX1_B
LSchem
atic diagrams
Revision history
Table 1. Document revision history
Date Version Changes
03-Sep-2019 1 Initial release.
13-Nov-2019 2 Added cover page image.
05-Dec-2019 3 Updated Section 1.3 Run the ST BLE Sensor smartphone app
STSW-MKSBOX1_BL
DB4001 - Rev 3 page 14/15
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to STproducts and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. STproducts are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design ofPurchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www.st.com/trademarks. All other product or servicenames are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2019 STMicroelectronics – All rights reserved
STSW-MKSBOX1_BL
DB4001 - Rev 3 page 15/15