please suggest me some API's to interface nrf51422 with RTC DS1307
please suggest me some API's to interface nrf51422 with RTC DS1307
I see. The RTC of the nRF will not work when the power supply is lost. That sort of applies to the DS1307 too, but there you have the optional backup supply, and moreover, the current consumption of the DS1307 when in battery backup mode is lower than you would get for the nRF5.
It is difficult to say anything about the error you get returned when calling nrf_drv_twi_rx()
or nrf_drv_twi_tx()
. However I wander if you called nrf_drv_twi_init()
before? With what parameters?
those are the parameters which i used to call nrf_drv_twi_init()
:
ret_code_t ret;
nrf_drv_twi_config_t config;
config.scl=7;
config.sda=30;
config.frequency = NRF_TWI_FREQ_100K;
config.interrupt_priority=0;
ret = nrf_drv_twi_init(&instance,&config,NULL,NULL);
Can you try changing the priority to APP_IRQ_PRIORITY_HIGH
(or APP_IRQ_PRIORITY_LOW
)?
Thank you thats working a bit but after first transmission rest ones are not working, in file nrf_drv_twi.c, in function twi_transfer there is a variable is_busy, which remains false after 1st transmission, which is in turn avoiding further communication can i reset it or there is some other procedure?
Hi Sunil,
I am also facing same problem.