You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2021/02/18 11:57:03 UTC
[mynewt-core] branch master updated (306f546 -> 3b59629)
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.
from 306f546 bsp/nordic_pca10095_net: set nrf5340 as default transport Net core app should use IPC transport by default , as it's used to communicate with app running on net core.
new 5dce508 hw/mcu/dialog: Synchronize DCDC handling between cores
new 3b59629 drivers/da1469x_charger: Keep DCDC off when VBUS is on
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
hw/drivers/chg_ctrl/da1469x_charger/src/da1469x_charger.c | 13 +++++++++++++
hw/mcu/dialog/da1469x/src/da1469x_prail.c | 11 +++++++++++
2 files changed, 24 insertions(+)
[mynewt-core] 01/02: hw/mcu/dialog: Synchronize DCDC handling
between cores
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 5dce508a1f60f233a3c97b838543814b76da96a2
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Feb 16 16:08:31 2021 +0100
hw/mcu/dialog: Synchronize DCDC handling between cores
When DCDC is turned off by M33 set shared memory accordingly
so DCDC is not turned on by CMAC.
---
hw/mcu/dialog/da1469x/src/da1469x_prail.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/mcu/dialog/da1469x/src/da1469x_prail.c b/hw/mcu/dialog/da1469x/src/da1469x_prail.c
index 319bb7a..0ea9d1b 100644
--- a/hw/mcu/dialog/da1469x/src/da1469x_prail.c
+++ b/hw/mcu/dialog/da1469x/src/da1469x_prail.c
@@ -24,6 +24,9 @@
#include "mcu/da1469x_hal.h"
#include "mcu/da1469x_prail.h"
#include "mcu/da1469x_retreg.h"
+#if MYNEWT_VAL_CHOICE(BLE_HCI_TRANSPORT, dialog_cmac)
+#include "cmac_driver/cmac_shared.h"
+#endif
#include "os/util.h"
#define POWER_CTRL_REG_SET(_field, _val) \
@@ -176,6 +179,10 @@ da1469x_prail_dcdc_restore(void)
if (CRG_TOP->ANA_STATUS_REG & CRG_TOP_ANA_STATUS_REG_COMP_VBAT_HIGH_Msk) {
da1469x_retreg_restore(g_mcu_dcdc_config, ARRAY_SIZE(g_mcu_dcdc_config));
DCDC->DCDC_CTRL1_REG |= DCDC_DCDC_CTRL1_REG_DCDC_ENABLE_Msk;
+#if MYNEWT_VAL_CHOICE(BLE_HCI_TRANSPORT, dialog_cmac)
+ /* Enable turning DCDC on from CMAC core. */
+ g_cmac_shared_data->dcdc.enabled = 1;
+#endif
}
}
#endif
@@ -183,6 +190,10 @@ da1469x_prail_dcdc_restore(void)
void
da1469x_prail_dcdc_disable(void)
{
+#if MYNEWT_VAL_CHOICE(BLE_HCI_TRANSPORT, dialog_cmac)
+ /* Prevent CMAC from turning DCDC on. */
+ g_cmac_shared_data->dcdc.enabled = 0;
+#endif
DCDC->DCDC_CTRL1_REG &= ~DCDC_DCDC_CTRL1_REG_DCDC_ENABLE_Msk;
}
[mynewt-core] 02/02: drivers/da1469x_charger: Keep DCDC off when
VBUS is on
Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 3b5962962b2c3a52084aaca1cf760b296465a882
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Feb 16 16:12:04 2021 +0100
drivers/da1469x_charger: Keep DCDC off when VBUS is on
When VBUS is present turn DCDC off, this will allow to
increase charge current when battery is not full.
It will also keep battery from partially discharging when its full.
---
hw/drivers/chg_ctrl/da1469x_charger/src/da1469x_charger.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hw/drivers/chg_ctrl/da1469x_charger/src/da1469x_charger.c b/hw/drivers/chg_ctrl/da1469x_charger/src/da1469x_charger.c
index 3107b2a..e1d7b64 100644
--- a/hw/drivers/chg_ctrl/da1469x_charger/src/da1469x_charger.c
+++ b/hw/drivers/chg_ctrl/da1469x_charger/src/da1469x_charger.c
@@ -27,6 +27,7 @@
#include <bsp/bsp.h>
#if MYNEWT_VAL(DA1469X_CHARGER_USE_CHARGE_CONTROL)
#include <charge-control/charge_control.h>
+#include <mcu/da1469x_prail.h>
#endif
int
@@ -127,6 +128,18 @@ static void
da1469x_vbus_state_changed_event_cb(struct os_event *ev)
{
assert(ev);
+#if MYNEWT_VAL(MCU_DCDC_ENABLE)
+ /*
+ * If VBUS is present turn off DCDC so charging current is higher.
+ * When devices is fully charged as long as VBUS is present battery will
+ * no be used to power DCDC so it will not deplete.
+ */
+ if ((CRG_TOP->ANA_STATUS_REG & CRG_TOP_ANA_STATUS_REG_VBUS_AVAILABLE_Msk) != 0) {
+ da1469x_prail_dcdc_disable();
+ } else {
+ da1469x_prail_dcdc_restore();
+ }
+#endif
NVIC_SetPendingIRQ(CHARGER_STATE_IRQn);
}