Dear Dialog team,
Thank you for your support.
We have custom board made from DA14683. We are using SDK DA1468x_DA15xxx_SDK_1.0.14.1081. Our requireement is to read date and time from RTC chip AB08X5.
We are using RTC AB08X5 chip in this custom board. This RTC is used in DA14681 wearable kit.
We ported wrbl_rtc.c, ab08x5.c files from 14681 wearable kit to the custom board. This RTC chip is accessed by using I2C lines, address given is 0x69.
During porting, we removed ".threshold = 1," (line number 70) in wkup_config structure in ad_gpio_intr.c file.
Also removed below lines from ad_gpio_intr_init() function in ad_gpio_intr.c file.
hw_wkup_set_counter_threshold(ad_gpio_intr_wkup_cfg.threshold);
hw_wkup_reset_counter();
During RTC initialization, wrbl_rtc_init() in the custom board, we observed ab08x5_get_date() function fails in the custom board. We put debug statements in wrbl_rtc_init() function and all debug statements are printed till the function ab08x5_get_date().
In ab08x5_get_date() function, below statement fails and we don't see other debug statements after this line.
reg_access_cb->read_register(AB08X5_REG_DATE, date_data, sizeof(date_data));
wrbl_rtc_init() is called in system_init() task.
We also did one more experiment; deleted below lines in wrbl_rtc_init(), but the issue still remains same.
-----------------------------------------------------------------------------------------------------------------------------------------
OS_EVENT_CREATE(rtc_ready_evt);
/* Register RTC_READY interrupt */
ad_gpio_intr_register(RTC_READY);
/* Initialize RTC and unregister/delete irq and event */
if(!hw_gpio_get_pin_status(AB08X5_INT_D_PORT, AB08X5_INT_D_PIN)){
/* Wait for the RTC to be ready -> FOUT/nIRQ set to high */
if (OS_EVENT_WAIT(rtc_ready_evt,
OS_MS_2_TICKS(RTC_READY_TIMEOUT_MS)) != OS_EVENT_SIGNALED) {
DBG_MSG_WRBL_TASK("RTC ready waiting timed out\r\n");
}
}
ad_gpio_intr_unregister(RTC_READY);
OS_EVENT_DELETE(rtc_ready_evt);
-----------------------------------------------------------------------------------------------------------------------------
你能帮助我们解决这个问题吗?
Best regards
Malli
Dear Dialog team,
Please close this case. We resolved this issue.
Best regards
Malli
Hi powersquare,
Glad that you figured your issue out. Any feedback/comments would be more than welcome.
Thanks, PM_Dialog