Hi,
I start to work on the NRF52840 and I would like to read register of BMA400 in burst mode (I mean possibility to read further register in one sequence)
I am novice in C language :-)
Currently, I can read a register but only one
I use the following function to do it
//read byte from register
char I2cReadReg8(const nrf_drv_twi_t *twi_handle, uint8_t address, uint8_t sub_address){
ret_code_t err_code;
uint8_t data; // `data` will store the register data
err_code = nrf_drv_twi_tx(twi_handle, address, &sub_address, sizeof(sub_address), true);
if (NRF_SUCCESS == err_code)
err_code = nrf_drv_twi_rx(twi_handle, address, &data, sizeof(data));
APP_ERROR_CHECK(err_code);
return data;
}
below is the function use on the previous function
__STATIC_INLINE
ret_code_t nrf_drv_twi_tx(nrf_drv_twi_t const * p_instance,
uint8_t address,
uint8_t const * p_data,
uint8_t length,
bool no_stop)
{
ret_code_t result = 0;
if (NRF_DRV_TWI_USE_TWIM)
{
result = nrfx_twim_tx(&p_instance->u.twim,
address, p_data, length, no_stop);
}
else if (NRF_DRV_TWI_USE_TWI)
{
result = nrfx_twi_tx(&p_instance->u.twi,
address, p_data, length, no_stop);
}
return result;
}
I don't know how to perform a burst mode by using this function.Below an extract of the datasheet of the BMA in order to be clear :-)

thanks in advance
regards