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

nrf52832 IIC easyDma not work

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;
    /* 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);
}
Parents
  • ret_code_t err_code = nrf_drv_twi_rx(&m_twi, LM75B_ADDR, &m_sample, len);
    when config len = 4,the info is as bellow:
    <info> app: 
    TWI sensor example started.
    when config len = 3,the info is as bellow:
    <info> app: 
    TWI sensor example started.
    <info> app: Temperature: 0 Celsius degrees.
    <info> app: Temperature: 0 Celsius degrees.
    <info> app: Temperature: 0 Celsius degrees.
    ....
    as I am not using lm75b, so the Temperature out is 0
Reply
  • ret_code_t err_code = nrf_drv_twi_rx(&m_twi, LM75B_ADDR, &m_sample, len);
    when config len = 4,the info is as bellow:
    <info> app: 
    TWI sensor example started.
    when config len = 3,the info is as bellow:
    <info> app: 
    TWI sensor example started.
    <info> app: Temperature: 0 Celsius degrees.
    <info> app: Temperature: 0 Celsius degrees.
    <info> app: Temperature: 0 Celsius degrees.
    ....
    as I am not using lm75b, so the Temperature out is 0
Children
Related