syscntl_dcdc_turn_on_in_boost_ROM() leads to a hardfault when DA14531-01 and DA14535 configured in bypass mode
ID: LPCBARESDK-1079
Status: Fixed
First reported: 6.0.20.1338
Fixed in: 6.0.24.1464
Description
The DA14531-01, a ROM variant of the primary DA14531-00, and DA14535 underwent a transfer of several SDK modules from SDK (RAM) to DA14531-01 and DA14535 ROM in order to conserve RAM space. During this update, a portion of the DCDC functions were relocated to ROM. However, an oversight occurred where the bypass flag, CFG_POWER_MODE_BYPASS
, was incorrectly designated to not be a parameter controlled by ROM.
If the DA14531-01 or DA14535 is utilized in bypass mode, the function syscntl_dcdc_turn_on_in_boost_ROM()
triggers a hardfault.
This issue will NOT arise in:
DA14531-00, as there is no corresponding ROM function.
DA14530, as there is no equivalent ROM function.
Workaround
Deactivate the ROM function and switch to the RAM alternative for the Bypass scenario.
Implement this patch by refraining from employing syscntl_dcdc_turn_on_in_boost_ROM
and reverting to the original syscntl_dcdc_turn_on_in_boost
function.
The following code modification should be applied in /sdk/platform/driver/syscntl/syscntl.c:
diff --git a/sdk/platform/driver/syscntl/syscntl.c b/sdk/platform/driver/syscntl/syscntl.c
index ac35327..a9eef87 100644
--- a/sdk/platform/driver/syscntl/syscntl.c
+++ b/sdk/platform/driver/syscntl/syscntl.c
@@ -179,7 +179,7 @@ int8_t syscntl_dcdc_turn_off(void)
}
#endif
-#if (defined (__DA14531_01__) || defined (__DA14535__)) && !defined (__EXCLUDE_ROM_SYSCNTL__)
+#if !defined (__EXCLUDE_ROM_SYSCNTL__)
int8_t syscntl_dcdc_turn_on_in_boost(syscntl_dcdc_level_t level)
{
return (syscntl_dcdc_turn_on_in_boost_ROM(level, &syscntl_dcdc_state, dcdc_reserved));