rwble ASSERT_WARNING issue

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Rajapurerohit
Offline
Last seen:9 months 2 weeks ago
Joined:2017-04-20 09:17
rwble ASSERT_WARNING issue

Hi DialogSupport,

I am working on project where i am working on I2C base touch sensor. I have designed the custom board using DA14583 MCU and IQS333 touch sensor MCU.

I have written the firmware and now i am working on sleep mode configuration. first i have followed is by defining/Enabling the ARCH_EXT_SLEEP_ON.
const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;

if i run the code, it immediately enters into attached sinppet and
hold into ASSERT_WARNING(0); line and not written any wake up API function yet.

void lld_sleep_compensate_func_patched(void)
{
uint32_t dur_us;
uint32_t slot_corr;
uint32_t fine_corr;

// Get the number of low power sleep period
uint32_t slp_period = ble_deepslstat_get();

// Sanity check: The duration of a sleep is limited
ASSERT_ERR(slp_period < LLD_EVT_MAX_SLEEP_DURATION);

// Convert sleep duration into us
dur_us = lld_sleep_lpcycles_2_us_sel_func (slp_period);
slot_corr = dur_us / 625;
fine_corr = 624 - (dur_us % 625);
if (fine_corr == 0)
fine_corr = 1;

// The correction values are then deduced from the sleep duration in us
ble_basetimecntcorr_set(slot_corr);
ble_finecntcorr_set(fine_corr);

// Start the correction
ble_deep_sleep_corr_en_setf(1);

if ((DEVELOPMENT_DEBUG) && (USE_POWER_OPTIMIZATIONS))
{
slp_period_retained = slp_period;
// if this Assertion hits then the LP ISR lasts longer than the time
// that has been reserved via LP_ISR_TIME_XTAL32_CYCLES and LP_ISR_TIME_USEC.
if (sleep_lp_cycles && (sleep_lp_cycles < slp_period))
ASSERT_WARNING(0);
}

}

Please note that i have a RDY_PIN interrupt coming from sensor, which interrupt my MCU whenever there is low pulse(this pulse interrupts MCU every 10ms ) and enter into interrupt handler function to read data from sensor.

while debugging i encountered an behavior of the device that is, whenever i get I2C_RDY pin interrupt of sensor at that time the device goes to ASSERT_WARNING (0);
However, if i remove RDY_PIN interrupt the code does not enter into ASSERT_WARNING(0);

Can any one help me to resolve issue. how i can debug this and work as required. It's urgent for me to debug.

Thanks and Regards
Rohit

Device:
PM_Dialog
Offline
Last seen:16 hours 18 min ago
Staff
Joined:2018-02-08 11:03
Hi Rajapurerohit,

Hi Rajapurerohit,

This assertion probably means that the LP_Hanlder takes too much time to execute and the warning that you get means that it took more time for the BLE core to wake up that the calculated value. Please check a previous thread:

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/some-porblem-sleep-mode

Thanks, PM_Dialog