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 tested again, init code is ok but it can not work when execute twi_transfer();

    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); }

    I am using SPI and TWI after BLE stack initiated. I want to trasfer some data to smart phone through BLE.

    S130 v1.0.1

    nRF51_SDK_10.0.0

    The above is my project environment. please consider it.

    I uploaded my complete project codes at main question, please find it.

    project code

    Thanks,

Reply
  • I tested again, init code is ok but it can not work when execute twi_transfer();

    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); }

    I am using SPI and TWI after BLE stack initiated. I want to trasfer some data to smart phone through BLE.

    S130 v1.0.1

    nRF51_SDK_10.0.0

    The above is my project environment. please consider it.

    I uploaded my complete project codes at main question, please find it.

    project code

    Thanks,

Children
No Data
Related