Skip to content

Commit 293e35b

Browse files
Changed magic value + update comments
1 parent bffe2b4 commit 293e35b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

flash/flash_device.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,12 @@ int __attribute__ ((noinline)) SEGGER_OPEN_Program(uint32_t address, uint32_t si
257257
#if RUNTIME_SECTORS
258258
int __attribute__ ((noinline, __used__)) SEGGER_OPEN_GetFlashInfo(flash_info *const info, uint32_t InfoAreaSize) {
259259
// set the sector count (max is 7)
260-
info->count = 7;
260+
info->count = max_info_sectors;
261261

262262
// set the flash data
263263
for (uint32_t i = 0; i < info->count; i++) {
264-
// set every sector (data pointer points is not set to something specific)
264+
// set every sector (we need to update every sector
265+
// we want to use as the data is not filled in)
265266
info->sectors[i] = {
266267
// set the start offset for the current sector
267268
.offset = i * 0x100,
@@ -276,4 +277,4 @@ int __attribute__ ((noinline)) SEGGER_OPEN_Program(uint32_t address, uint32_t si
276277

277278
return 0;
278279
}
279-
#endif
280+
#endif

0 commit comments

Comments
 (0)