Hello,
I have been working with a nrf52DK PCA10040 V1.2.1 on SDK 14 without a softdevice and I have encountered a problem with a TWI sensor.
I have a TE MEAS MS5611 barometric sensor on a breakout board designed for 5v. This sensor works on an arduino at both 3.3V and 5v.
I am using the TWI_scanner example, and this code and circuit works for other I2C devices on 5v break out boards that I have (using 3.3v or 5v on the nrf52 dk), however I have four MS5611 sensors and none of them work with the nrf52 dk.
If I use 3.3v with a 10k pull up resistor, the device is unresponsive. If I use 5v with any pull up or 3.3v with 4.7k or smaller pull up, the device will hang in the while loop of the nrf_drv_twi.c code (line 916):
while (!nrf_twim_event_check(p_twim, evt_to_wait))
{
if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR))
{
NRF_LOG_DEBUG("TWIM: Event: %s.",
(uint32_t)EVT_TO_STR_TWIM(NRF_TWIM_EVENT_ERROR));
nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_ERROR);
nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME);
nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STOP);
evt_to_wait = NRF_TWIM_EVENT_STOPPED;
}
}
I do not have an oscilloscope, so I cannot see what the signal is doing.
I plan to move away from the current breakout board to my own 3.3v circuit, but it would speed up progress if I could get this breakout board working with the nrf52 dk.
Any help would be greatly appreciated. Thank you.
Edit: I have not put a circuit diagram, but circuit is very simple. It uses pins 26 and 27 for SDA and SCL. With a 10k pullup resistor from VDD to both SDA and SCL. This exact circuit works fine with the MS5611 and an Arduino, and a Bosch BMP280 works with either Arduino or NRF5, I just cannot get the NRF5 to work with MS5611.