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

Unexpected system reset(may caused with spi and twi conflict)

Hi, Guys,

I have occured a wired thing. I use NRF51822 with softdevice S130 to do a BLE project. I use both spi and twi to get information from sensor(I use spi0 and twi1, I know that the spi0 and twi0 share the same base address). However, after power on, the chip continuously reset itself. The reset reason is 0x08 cpu lock-up. The wired thing is, this won't happen during the debug session. only happen on regular power-on session. So I can not even debug where goes wrong. Does anyone who may know this? Thank you so much.

I use twi_hw_master and spi_master from the SDK V7.1.0, but I use SHORTS in twi_hd_master instead of PPI.

UPDATE: after tried several times, I think I know what's going on, the thing is SPI and TWI can not coexist. If I disable one of these two, the system works fine. But I still don't know why, because I use SPI0 and TWI1, there two peripheral didn't share the resource. Does any one know why?

Related