Hi there,
When I operate SPI and I2C simultaneously on nRF52832, an error has occurred.
Could you please teach me how to solve an error?
I use an attached "main.c".
The below process is executed when operating SPI and I2C simultaneously.
1) When Raspberry Pi as I2C master reads nRF52832 as I2C slave,
TWIS_EVT_READ_REQ is active in function "twis_event_handler" on line 358 and
function "ees_readBegin" is executed.
2) When function "sensor_update" is executed in function "ees_readBegin" on line 213,
nRF52832 reads pressure and temperature from external 5 pressure sensors by SPI.
3) When function "spi_read_acc" is executed in function "sensor_update" on line 1171,
nRF52832 reads pressure and temperature from external 5 pressure sensors by SPI,
and read pressure and temperature is stored to "m_manufac_data".
Then data of "m_manufac_data" is copied to "i2c_spi_data".
4) When I run on debug mode, function "nrf_drv_spi_transfer" in function "spi_read_acc" on line 938
is executed and an error has occurred like an attached "error_messeage.png".
However, when I run on normal mode, function "ees_readEnd" on line 238 is executed,
and Raspberry Pi as I2C master reads the unexpected value of pressure and temperature.
Best regards,
Yasuyuki