Skip to content

Commit 3839a82

Browse files
Merge branch 'development' into hotfix/pwm-channel4
2 parents 965e4ad + a6be4c8 commit 3839a82

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

.changesets/add_check_ethernet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release: minor
2+
summary: add an ethernet connected check
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release: patch
2+
summary: MPUDomain dynamic regions were configured using the linker symbol values instead of their addresses (that is the correct way of using linker symbols). That made non-cached regions cached, and caused harware undefined behaviour.

Inc/HALAL/Models/MPU.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,18 +310,18 @@ struct MPUDomain {
310310

311311
// Dynamic Configuration based on Linker Symbols
312312
configure_dynamic_region(
313-
(uintptr_t)__mpu_d1_nc_start,
314-
(uintptr_t)__mpu_d1_nc_end,
313+
reinterpret_cast<uintptr_t>(&__mpu_d1_nc_start),
314+
reinterpret_cast<uintptr_t>(&__mpu_d1_nc_end),
315315
MPU_REGION_NUMBER3
316316
);
317317
configure_dynamic_region(
318-
(uintptr_t)__mpu_d2_nc_start,
319-
(uintptr_t)__mpu_d2_nc_end,
318+
reinterpret_cast<uintptr_t>(&__mpu_d2_nc_start),
319+
reinterpret_cast<uintptr_t>(&__mpu_d2_nc_end),
320320
MPU_REGION_NUMBER5
321321
);
322322
configure_dynamic_region(
323-
(uintptr_t)__mpu_d3_nc_start,
324-
(uintptr_t)__mpu_d3_nc_end,
323+
reinterpret_cast<uintptr_t>(&__mpu_d3_nc_start),
324+
reinterpret_cast<uintptr_t>(&__mpu_d3_nc_end),
325325
MPU_REGION_NUMBER7
326326
);
327327

Inc/HALAL/Services/Communication/Ethernet/NewEthernet.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ struct EthernetDomain {
264264
SNTP::sntp_update(sntp_server);
265265
sntp_started = true;
266266
}
267-
};
267+
}
268+
bool is_connected() { return netif_is_link_up(&gnetif); }
268269
};
269270

270271
template <std::size_t N> struct Init {

0 commit comments

Comments
 (0)