File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 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 {
254254static uint8_t *_boardInfo = (uint8_t *)(0x801F000 );
255255static bool has_otp_info = false ;
256256
257+ static SecureQSPIFBlockDevice secure_root;
258+
257259// 8Kbit secure OTP area (on MX25L12833F)
258260bool getSecureFlashData () {
259- static SecureQSPIFBlockDevice root;
260261 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));
263264 if (info->magic == OTP_QSPI_MAGIC) {
264265 _boardInfo = (uint8_t *)info;
265266 has_otp_info = true ;
266267 } else {
267268 delete info;
268269 }
270+ secure_root.deinit ();
269271 return ret == 0 ;
270272}
271273
You can’t perform that action at this time.
0 commit comments