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

initial TWI in nrf52832

I have hard time in start a twi in nrf52832 with SDK11.0, I can't initial twi ,whatever i do ,when i build is still an error ,here is my code:

static const nrf_drv_twi_t iic0_acc0_instance = NRF_DRV_TWI_INSTANCE(0);
//const nrf_drv_twi_t m_twi_mma_7660 = NRF_DRV_TWI_INSTANCE(0);

void IIC_init(void)
{
		uint32_t err_code;
		const nrf_drv_twi_config_t iic0_acc0_config = {
		   .scl                = IIC_SCL_PIN,
       .sda                = IIC_SDA_PIN,
       .frequency          = NRF_TWI_FREQ_100K,
       .interrupt_priority = APP_IRQ_PRIORITY_LOW
		};
		err_code = nrf_drv_twi_init(&iic0_acc0_instance,&iic0_acc0_config,NULL,NULL);
		APP_ERROR_CHECK(err_code);
		nrf_drv_twi_enable(&iic0_acc0_instance);
}

when i build it ,there has an error: TWI.png

Parents Reply Children
No Data