RTC AB08X5 with custom board 14683

⚠️
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.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
powersquare
Offline
Last seen:3 months 3 weeks ago
Joined:2018-12-27 04:15
RTC AB08X5 with custom board 14683

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

Device:
powersquare
Offline
Last seen:3 months 3 weeks ago
Joined:2018-12-27 04:15
Dear Dialog team,

Dear Dialog team,

Please close this case. We resolved this issue.

Best regards

Malli

PM_Dialog
Offline
Last seen:3 hours 17 min ago
Staff
Joined:2018-02-08 11:03
Hi powersquare,

Hi powersquare,

Glad that you figured your issue out. Any feedback/comments would be more than welcome.

Thanks, PM_Dialog