when DA14638 bring up, __BKPT(0) ocurrs.

Learn MoreFAQsTutorials

4 posts / 0 new
Last post
xuguodong
Offline
Last seen:1 month 3 weeks ago
加入:2020-06-04 13:34
when DA14638 bring up, __BKPT(0) ocurrs.

Hi Dialog teams,

when DA14638 bring up,__BKPT(0) ocurrs.

How to analyze this kind of issue.

Please help me to check.

Thanks.

__RETAINED_CODE void hw_watchdog_handle_int(unsigned long *exception_args)
{
// Reached this point due to a WDOG timeout
uint16_t pmu_ctrl_reg = CRG_TOP->PMU_CTRL_REG;
pmu_ctrl_reg |= ((1 << CRG_TOP_PMU_CTRL_REG_BLE_SLEEP_Pos) | /* turn off BLE */
(1 << CRG_TOP_PMU_CTRL_REG_FTDF_SLEEP_Pos) | /* turn off FTDF */
(1 << CRG_TOP_PMU_CTRL_REG_RADIO_SLEEP_Pos) | /* turn off radio PD */
(1 << CRG_TOP_PMU_CTRL_REG_PERIPH_SLEEP_Pos)); /* turn off peripheral power domain */
CRG_TOP->PMU_CTRL_REG = pmu_ctrl_reg;
REG_SET_BIT(CRG_TOP, CLK_RADIO_REG, BLE_LP_RESET); /* reset the BLE LP timer */

#if (dg_configIMAGE_SETUP == DEVELOPMENT_MODE)
hw_watchdog_freeze(); // Stop WDOG

ENABLE_DEBUGGER;

if (exception_args != NULL) {
*(volatile unsigned long *)(STATUS_BASE ) = exception_args[0]; // R0
*(volatile unsigned long *)(STATUS_BASE + 0x04) = exception_args[1]; // R1
*(volatile unsigned long *)(STATUS_BASE + 0x08) = exception_args[2]; // R2
*(volatile unsigned long *)(STATUS_BASE + 0x0C) = exception_args[3]; // R3
*(volatile unsigned long *)(STATUS_BASE + 0x10) = exception_args[4]; // R12
*(volatile unsigned long *)(STATUS_BASE + 0x14) = exception_args[5]; // LR
*(volatile unsigned long *)(STATUS_BASE + 0x18) = exception_args[6]; // PC
*(volatile unsigned long *)(STATUS_BASE + 0x1C) = exception_args[7]; // PSR
*(volatile unsigned long *)(STATUS_BASE + 0x20) = (unsigned long)exception_args; // Stack Pointer

*(volatile unsigned long *)(STATUS_BASE + 0x24) = (*((volatile unsigned long *)(0xE000ED28))); // CFSR
*(volatile unsigned long *)(STATUS_BASE + 0x28) = (*((volatile unsigned long *)(0xE000ED2C))); // HFSR
*(volatile unsigned long *)(STATUS_BASE + 0x2C) = (*((volatile unsigned long *)(0xE000ED30))); // DFSR
*(volatile unsigned long *)(STATUS_BASE + 0x30) = (*((volatile unsigned long *)(0xE000ED3C))); // AFSR
*(volatile unsigned long *)(STATUS_BASE + 0x34) = (*((volatile unsigned long *)(0xE000ED34))); // MMAR
*(volatile unsigned long *)(STATUS_BASE + 0x38) = (*((volatile unsigned long *)(0xE000ED38))); // BFAR
}

hw_cpm_assert_trigger_gpio();

if (REG_GETF(CRG_TOP, SYS_STAT_REG, DBG_IS_ACTIVE)) {
__BKPT(0);// when debug,this stops.
}
else {
while (1);
}

#else // dg_configIMAGE_SETUP == DEVELOPMENT_MODE
if (exception_args != NULL) {
nmi_event_data[0] = NMI_MAGIC_NUMBER;
nmi_event_data[1] = exception_args[0]; // R0
nmi_event_data[2] = exception_args[1]; // R1
nmi_event_data[3] = exception_args[2]; // R2
nmi_event_data[4] = exception_args[3]; // R3
nmi_event_data[5] = exception_args[4]; // R12
nmi_event_data[6] = exception_args[5]; // LR
nmi_event_data[7] = exception_args[6]; // PC
nmi_event_data[8] = exception_args[7]; // PSR
}

// Wait for the reset to occur
while (1);
# endif / / dg_configIMAGE_SETUP = =发展ENT_MODE
}

Device:
xuguodong
Offline
Last seen:1 month 3 weeks ago
加入:2020-06-04 13:34
I attached screenshot.

I attached screenshot.

PM_Dialog
Offline
Last seen:15 hours 10 min ago
Staff
加入:2018-02-08 11:03

Hi xuguodong,

Please check again your last comment and try to attach the correct file - here we can provide support only for Dialog products.

Regarding your initial question, please refer toDebugging Techniques Tutorialin order to analyze the WDOG..

Thanks, PM_Dialog

xuguodong
Offline
Last seen:1 month 3 weeks ago
加入:2020-06-04 13:34
Thanks for your repply.

Thanks for your repply.