SmartSnippets DA1459x SDK
suota.h
Go to the documentation of this file.
1 
41 #ifndef SUOTA_H_
42 #define SUOTA_H_
43 
44 #include <stdint.h>
45 
46 #define SUOTA_VERSION_1_1 11
47 #define SUOTA_VERSION_1_2 12
48 #define SUOTA_VERSION_1_3 13
49 #define SUOTA_VERSION_1_4 14 // Security extension
50 
51 #ifndef SUOTA_VERSION
52 #define SUOTA_VERSION SUOTA_VERSION_1_3
53 #endif
54 
55 #if SUOTA_PSM && (SUOTA_VERSION < SUOTA_VERSION_1_2)
56 # error "SUOTA_PSM is only applicable to SUOTA_VERSION >= 1.2"
57 #endif
58 
67 typedef struct {
68  uint8_t signature[2];
69  uint16_t flags;
70  uint32_t current_image_location;
71  uint32_t update_image_location;
72  uint8_t reserved[8];
74 
75 #define SUOTA_1_1_PRODUCT_HEADER_SIGNATURE_B1 0x70
76 #define SUOTA_1_1_PRODUCT_HEADER_SIGNATURE_B2 0x62
77 
86 typedef struct {
87  uint8_t signature[2];
88  uint16_t flags;
89  uint32_t code_size;
90  uint32_t crc;
91  uint8_t version[16];
92  uint32_t timestamp;
93  uint32_t exec_location;
95 
96 #define SUOTA_1_1_IMAGE_HEADER_SIGNATURE_B1 0x70
97 #define SUOTA_1_1_IMAGE_HEADER_SIGNATURE_B2 0x61
98 
99 #define SUOTA_1_1_IMAGE_FLAG_FORCE_CRC 0x01
100 #define SUOTA_1_1_IMAGE_FLAG_VALID 0x02
101 #define SUOTA_1_1_IMAGE_FLAG_RETRY1 0x04
102 #define SUOTA_1_1_IMAGE_FLAG_RETRY2 0x08
103 
105 
112 typedef struct {
114  uint8_t image_identifier[2];
116  uint32_t size;
118  uint32_t crc;
120  uint8_t version_string[16];
122  uint32_t timestamp;
124  uint32_t pointer_to_ivt;
126 
127 #define SUOTA_1_1_IMAGE_DA1469x_HEADER_SIGNATURE_B1 0x51
128 #define SUOTA_1_1_IMAGE_DA1469x_HEADER_SIGNATURE_B2 0x71
129 
130 #define SUOTA_1_1_PRODUCT_DA1469x_HEADER_SIGNATURE_B1 0x50
131 #define SUOTA_1_1_PRODUCT_DA1469x_HEADER_SIGNATURE_B2 0x70
132 
133 #endif /* SUOTA_H_ */
134 
__attribute__::pointer_to_ivt
uint32_t pointer_to_ivt
Definition: suota.h:124
__attribute__::crc
uint32_t crc
Definition: suota.h:90
__attribute__::timestamp
uint32_t timestamp
Definition: suota.h:92
__attribute__
__attribute__
Definition: suota_security_ext.h:98
suota_1_1_image_header_da1469x_t
SUOTA 1.1 image header for DA1469x devices.
__attribute__::size
uint32_t size
Definition: suota.h:116
suota_1_1_image_header_t
SUOTA 1.1 image header as defined by Dialog SUOTA specification.
suota_1_1_product_header_t
SUOTA 1.1 product header as defined by Dialog SUOTA specification.