Skip to content

Commit 812e58d

Browse files
committed
Opta: enable board info
1 parent 826b5c2 commit 812e58d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libraries/STM32H747_System/examples/STM32H747_manageBootloader/STM32H747_manageBootloader.ino

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99
#include "portenta_lite_bootloader.h"
1010
#include "portenta_lite_connected_bootloader.h"
1111
#define GET_OTP_BOARD_INFO
12+
typedef PortentaBoardInfo BoardInfo;
1213
#elif defined(ARDUINO_NICLA_VISION)
1314
#include "nicla_vision_bootloader.h"
1415
#elif defined(ARDUINO_OPTA)
16+
#define GET_OTP_BOARD_INFO
17+
#include "opta_info.h"
18+
typedef OptaBoardInfo BoardInfo;
1519
#include "opta_bootloader.h"
1620
#endif
1721

@@ -54,11 +58,13 @@ void setup() {
5458
Serial.println("Has Crypto chip: " + String(bootloader_data[9] == 1 ? "Yes" : "No"));
5559

5660
#ifdef GET_OTP_BOARD_INFO
57-
auto info = *((PortentaBoardInfo*)boardInfo());
61+
auto info = *((BoardInfo*)boardInfo());
5862
if (info.magic == 0xB5) {
5963
Serial.println("Secure info version: " + String(info.version));
6064
Serial.println("Secure board revision: " + String(info.revision >> 8) + "." + String(info.revision & 0xFF));
65+
#if defined(ARDUINO_PORTENTA_H7_M7)
6166
Serial.println("Secure carrier identification: " + String(info.carrier >> 8) + "." + String(info.revision & 0xFF));
67+
#endif
6268
Serial.println("Secure vid: 0x" + String(info.vid, HEX));
6369
Serial.println("Secure pid: 0x" + String(info.pid, HEX));
6470
Serial.println("Secure mac: " + String(info.mac_address[0], HEX) + ":" + String(info.mac_address[1], HEX) + ":" +

0 commit comments

Comments
 (0)