Additional features
Battery service
The SDT uses the standard bluetooth low energy battery service to report its battery status and allow, for instance, to notify the user to replace a device (or recharge) when its battery is close to being depleted.
Current Time service
The SDT uses the standard bluetooth low energy current time service to allow the internal RTC configuration. As the RTC is used as a source for time stamping, one could use time synchronized event to rebuild multiple devices interactions with ease.
Shipping mode
In order to extend shelf lifetime, the device will enter hibernate mode after the first boot. Please refer to DA1469x datasheet for more information about hibernate mode.
Configuration parameters
The configuration allows a great level of application flexibility without requiring the need to modify the algorithm or even update the firmware. The content in NVMS_PARAM_PART should be written during production. The configuration will be read at boot time and used in place of the default WiRA SDK values.
The NVMS_PARAM_PART is made of the BLE parameters and the Social Distance Tag section.
Invalid value should be left to 0xFF.
BLE parameters
Start Address: 0x0FE000 (start of the NVMS_PARAM_PART) Content:
Offset | Parameter | Description |
---|---|---|
0 | PLATFORM BD ADDRESS | 6 bytes for BD Address and 1 byte at the end as “valid” flag |
In the case this not set, the Application will generate a Random address and write it in this place and use the same for product lifetime (or until the FLASH is totally erased).The “valid” entry flag is one byte after the 6 bytes of the BD Address. 0x00 indicates valid BD Address, and the application will use it. The rest of the entries are of no interest for the Social Distance Tag application and should be left with 0xFF.
Software update
TBD
Flash partition
The partition table is designed for a 32Mb flash. One could modify the partition table to adapt your application specific needs. The WiRA SDK contains additional flash partition examples for different flash sizes which could be used as references.
/**
* \brief NVMS Partition IDs
*/
typedef enum {
NVMS_FIRMWARE_PART = 1,
NVMS_PARAM_PART = 2,
NVMS_BIN_PART = 3,
NVMS_LOG_PART = 4,
NVMS_GENERIC_PART = 5,
NVMS_PLATFORM_PARAMS_PART = 15,
NVMS_PARTITION_TABLE = 16,
NVMS_FW_EXEC_PART = 17,
NVMS_FW_UPDATE_PART = 18,
NVMS_PRODUCT_HEADER_PART = 19,
NVMS_IMAGE_HEADER_PART = 20,
} nvms_partition_id_t;
#define NVMS_PRODUCT_HEADER_PART_START 0x000000
#define NVMS_PRODUCT_HEADER_PART_SIZE 0x002000
#define NVMS_FIRMWARE_PART_START 0x002000 /* Alignment to 512KB is dictated by the default FLASH_REGION_SIZE. */
#define NVMS_FIRMWARE_PART_SIZE 0x07E000
/* +----------------512KB---------------------+ */
#define NVMS_GENERIC_PART_START 0x0E0000
#define NVMS_GENERIC_PART_SIZE 0x020000
#define NVMS_PLATFORM_PARAMS_PART_START 0x100000
#define NVMS_PLATFORM_PARAMS_PART_SIZE 0x0FF000
#define NVMS_PARAM_PART_START 0x1FF000
#define NVMS_PARAM_PART_SIZE 0x001000 /* Recommended location, 4KB before the end of the 1st flash section. */
/* +------------------2MB---------------------+ */
#define NVMS_LOG_PART_START 0x200000
#define NVMS_LOG_PART_SIZE 0x100000
#define NVMS_BIN_PART_START 0x300000
#define NVMS_BIN_PART_SIZE 0x0FF000
#define NVMS_PARTITION_TABLE_START 0x3FF000
#define NVMS_PARTITION_TABLE_SIZE 0x001000 /* Recommended location, 4KB before the end of the flash. */
PARTITION2( NVMS_PRODUCT_HEADER_PART , 0 )
PARTITION2( NVMS_FIRMWARE_PART , 0 )
PARTITION2( NVMS_GENERIC_PART , PARTITION_FLAG_VES )
PARTITION2( NVMS_PLATFORM_PARAMS_PART , PARTITION_FLAG_READ_ONLY )
PARTITION2( NVMS_PARAM_PART , 0 )
PARTITION2( NVMS_LOG_PART , 0 )
PARTITION2( NVMS_BIN_PART , 0 )
PARTITION2( NVMS_PARTITION_TABLE , PARTITION_FLAG_READ_ONLY )
Social Distance Tag parameters
This section contains all the Social Distance Tag parametrization needed to fully customize the device and create all types of devices with the same code. Start Address: 0x0FE100
Offset
Parameter
Description
0
UID
The device unique ID. Must be a unique number per device. 4 bytes (uint32_t)
4
TYPE
The device type. 0 for Wearable device. 1 byte (uint8_t).Invalid/ignored value: 0xFF
5
WIRA_enabled
6
CONNECT TO ME
7
FIRST BOOT
8
DANGER RSSI
9
WARNING RSSI
10
COARSE RSSI
12
DANGER DISTANCE
14
WARNING DISTANCE
16
COARSE DISTANCE
24
SDT UUID
40
Device Name
70
Proximity Scan Duration