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

how to use hardware spi and i2c on S130 softdevice(nRF51822)??

Hello,

I am developing a new product using S130 on nRF51822(QFAC). My product use LCD as spi interface and ADXL345 sensor as i2c interface, also test it, works well without softdevice, but when I upload S130 softdevice it goes to h/w fault.

I searched similar problem in this forum, but I cannot find clear solution. Is it possible use hardware spi and i2c on s130 softdevice concurrently?? Please let me know how to handle this problem.

ble_app_uart_on_SDK_v10_0_0.zip

Thanks,

Parents
  • I believe it is going to hard fault because you are accessing an invalid memory location when you try to set the TWI0 address register. You should call something like ADXL375_I2C_init() so that the driver knows the memory address of the TWI peripheral. If you are not calling ADXL375_I2C_init() without SoftDevice I would guess the memory address is still incorrect, but it may not cause a hard fault. That is what I experienced at least.

Reply
  • I believe it is going to hard fault because you are accessing an invalid memory location when you try to set the TWI0 address register. You should call something like ADXL375_I2C_init() so that the driver knows the memory address of the TWI peripheral. If you are not calling ADXL375_I2C_init() without SoftDevice I would guess the memory address is still incorrect, but it may not cause a hard fault. That is what I experienced at least.

Children
Related