hello,
I have a problem when using the example twi_sensor with nrf52832( nRF5_SDK_15.3.0_59ac345\examples\peripheral\twi_sensor\pca10040\blank\arm5_no_packs)
This example use LM75B, as I don't have this sensor, I changed the IIC address with an existing sensor,so the IIC can be replyed correctly.
then I change the length in read_sensor_data(), because I want more IIC CLK(it's just for test, I don't change other config code)
when len in this function( nrf_drv_twi_rx(&m_twi, LM75B_ADDR, &m_sample, len); ) is configed larger than three, such as four, the function will not work, what's the matter please?
static void read_sensor_data()
{
m_xfer_done = false;
{
m_xfer_done = false;
/* Read 1 byte from the specified address - skip 3 bits dedicated for fractional part of temperature. */
ret_code_t err_code = nrf_drv_twi_rx(&m_twi, LM75B_ADDR, &m_sample, 3);
APP_ERROR_CHECK(err_code);
}
ret_code_t err_code = nrf_drv_twi_rx(&m_twi, LM75B_ADDR, &m_sample, 3);
APP_ERROR_CHECK(err_code);
}