This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MCP7940 drivers for nrf52840

We are working on external RTC MCP7940(i2c) interfaced with nrf52840. Please check if drivers of the same for nrf52/51 are available or any implementation of CLOCK using MCP7940 with NRF?

Regards

Vishal Aditya

Embedded Software Engineer

Parents Reply
  • Pls check

    const uint8_t  MCP7940_ST                =         7; ///< MCP7940 register bits. RTCSEC reg
    //REST variables remains same as above
    	while(1)
    	{
    	uint8_t tx_data[] = {REG_RTCSEC, MCP7940_ST };
    	uint8_t rx_data[] = REG_RTCSEC;
    
    	//trying to start oscillator
    		err_code = nrf_drv_twi_tx(&m_twi,MCP7940_I2C,tx_data , sizeof(tx_data),false);
    		APP_ERROR_CHECK(err_code);
    	  err_code = nrf_drv_twi_rx(&m_twi,MCP7940_I2C,rx_data,1);
    		nrf_delay_ms(1);
        }

Children
Related