This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A parameter (p_data) of the function nrf_drv_twi_tx will not change

Edit:I'm using sdk 10.x, with softdevice S110 version 8.x, so yes, the library function could be obsolete but I don't think that's the cause.

Edit #2 it seems that it will stick with not the "first value", but the "last value". That is, nrf_drv_twi_tx will stubbornly hold the value of the 3rd parameter it was called last time. Strange.

Hi, I noticed something rather odd today.

When calling function:

ret_code_t nrf_drv_twi_tx(nrf_drv_twi_t const * const p_instance,
                      uint8_t                     address,
                      uint8_t const *             p_data,
                      uint32_t                    length,
                      bool                        xfer_pending)
{
return twi_transfer(p_instance, address,
                    p_data, length,
                    xfer_pending, true);
}

no matter what I do, the parameter

p_data

will retain the same value as it was called the 1st time, in order words, if you feed "0x1D" into it for the first time, it will stay that way forever it seems, no matter what value you squeeze into it.

What is wrong with it or my program? Could it be the "const" modifier?

Related