This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C with Softdevice nrf_drv_twi_enable hangs

Using SDK 12.1.0

I2C with SoftDevice works on PCA10040 Eval Board with nRF52832 but hangs in the nrf_drv_twi_enable function with TY module EBSGCNZWY which is an nRF51822 version F1. Running without the SoftDevice on the TY module, the I2C works fine.

Parents
  • Using the following from the TY DataSheet:

    The evaluation board included with the Nordic Development Kit uses a 16MHz clock. Therefore the sample code from Nordic is designed to be used with a 16MHz clock. On the other hand, the EYSGCN series module uses a 32MHz system clock, making it incompatible with the Nordic sample code (i.e. sample code does not configure HFCLK: XTALFREQ register for 32MHz). To fix this issue, we need to write the value 0xFFFFFF00 to the UICR (User Information Configuration Register) at address 0x10001008. Please note that the UICR is erased whenever you download a SoftDevice. The UICR can be written by using the debug tools:

    nrfjprog.exe --snr <your_jlink_debugger_serial_number> --memwr 0x10001008 --val 0xFFFFFF00

Reply
  • Using the following from the TY DataSheet:

    The evaluation board included with the Nordic Development Kit uses a 16MHz clock. Therefore the sample code from Nordic is designed to be used with a 16MHz clock. On the other hand, the EYSGCN series module uses a 32MHz system clock, making it incompatible with the Nordic sample code (i.e. sample code does not configure HFCLK: XTALFREQ register for 32MHz). To fix this issue, we need to write the value 0xFFFFFF00 to the UICR (User Information Configuration Register) at address 0x10001008. Please note that the UICR is erased whenever you download a SoftDevice. The UICR can be written by using the debug tools:

    nrfjprog.exe --snr <your_jlink_debugger_serial_number> --memwr 0x10001008 --val 0xFFFFFF00

Children
No Data
Related