@@ -283,19 +283,17 @@ static bool has_otp_info = false;
283283
284284bool getSecureFlashData () {
285285static OptaBoardInfo info;
286- uint8_t temp_buf[sizeof (OptaBoardInfo) +1 ];
287- int ret =0 ;
288- static SecureQSPIFBlockDevice secure_root;
289- secure_root.init ();
290- // read secure sector 2 ( address 1 << 13 )
291- ret = secure_root.readSecure (temp_buf, (1 <<13 ),sizeof (temp_buf));
286+ char temp_buf[sizeof (OptaBoardInfo) +1 ];
287+ int ret = QSPI_STATUS_OK;
288+ mbed::QSPI_qspi (QSPI_FLASH1_IO0, QSPI_FLASH1_IO1, QSPI_FLASH1_IO2, QSPI_FLASH1_IO3, QSPI_FLASH1_SCK, QSPI_FLASH1_CSN, QSPIF_POLARITY_MODE_0);
289+ auto rxlen =sizeof (temp_buf);
290+ ret = _qspi.read (0x48 , -1 ,1 <<13 , temp_buf, &rxlen);
292291memcpy (&info, &temp_buf[1 ],sizeof (OptaBoardInfo));
293292if (info.magic == OTP_QSPI_MAGIC) {
294293 _boardInfo = (uint8_t *)&info;
295294 has_otp_info =true ;
296295 }
297- secure_root.deinit ();
298- return ret ==0 ;
296+ return ret == QSPI_STATUS_OK;
299297}
300298
301299uint8_t *boardInfo () {