File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -254,18 +254,20 @@ class SecureQSPIFBlockDevice: public QSPIFBlockDevice {
254
254
static uint8_t *_boardInfo = (uint8_t *)(0x801F000 );
255
255
static bool has_otp_info = false ;
256
256
257
+ static SecureQSPIFBlockDevice secure_root;
258
+
257
259
// 8Kbit secure OTP area (on MX25L12833F)
258
260
bool getSecureFlashData () {
259
- static SecureQSPIFBlockDevice root;
260
261
static PortentaBoardInfo* info = new PortentaBoardInfo ();
261
- root .init ();
262
- auto ret = root .readSecure (info, 0 , sizeof (PortentaBoardInfo));
262
+ secure_root .init ();
263
+ auto ret = secure_root .readSecure (info, 0 , sizeof (PortentaBoardInfo));
263
264
if (info->magic == OTP_QSPI_MAGIC) {
264
265
_boardInfo = (uint8_t *)info;
265
266
has_otp_info = true ;
266
267
} else {
267
268
delete info;
268
269
}
270
+ secure_root.deinit ();
269
271
return ret == 0 ;
270
272
}
271
273
You can’t perform that action at this time.
0 commit comments