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

Transfer project nrf52810 on nrf52832

Hi, faced a problem while transferring a project nrf52810 on nrf52832. I changed project settings and file paths comparing projects. The connection with the phone became very bad on nrf52832. I changed BLE_GATT_ATT_MTU_DEFAULT on size NRF_SDH_BLE_GATT_MAX_MTU_SIZE, 43 on nrf52832. I changed NRF_SDH_BLE_GATT_MAX_MTU_SIZE on 43, but no changed BLE_GATT_ATT_MTU_DEFAULT on nrf52810. Only after that it became stable to connect to the phone. What is the cause of this problem?

Parents
  • Hi

    Just to make sure I understand correctly. You have an nRF52810 project that you are trying to transfer over to work on nRF52832 HW? It is usually the other way around, as most example projects have an nRF52832 variant, but not an nRF52810 one. Thus we have a guide to move projects from the nRF52832 to nRF52810. Please try doing the "Transferring the project to nRF52810 hardware" guide "backwards" so that you change the target device to nRF52832, add the preprocessor defines "NRF52" and "NRF52832_XXAA". Remove the "NRF52810_XXAA" preprocessor define. Adjust the linker script to match the maximum RAM and Flash memory of the nRF52832. Remove the nRF52810 startup and system files, and add the startup_nrf52.s and system_nrf52.c files.

    It shouldn't be necessary to edit the MTU size if the application code hasn't been modified at all either. Can you clarify what you mean by the connection being very bad? Do you get a specific disconnect reason or error code from the nRFConnect app or nRF52832?

    Best regards,

    Simon

Reply
  • Hi

    Just to make sure I understand correctly. You have an nRF52810 project that you are trying to transfer over to work on nRF52832 HW? It is usually the other way around, as most example projects have an nRF52832 variant, but not an nRF52810 one. Thus we have a guide to move projects from the nRF52832 to nRF52810. Please try doing the "Transferring the project to nRF52810 hardware" guide "backwards" so that you change the target device to nRF52832, add the preprocessor defines "NRF52" and "NRF52832_XXAA". Remove the "NRF52810_XXAA" preprocessor define. Adjust the linker script to match the maximum RAM and Flash memory of the nRF52832. Remove the nRF52810 startup and system files, and add the startup_nrf52.s and system_nrf52.c files.

    It shouldn't be necessary to edit the MTU size if the application code hasn't been modified at all either. Can you clarify what you mean by the connection being very bad? Do you get a specific disconnect reason or error code from the nRFConnect app or nRF52832?

    Best regards,

    Simon

Children
  • I have already answered the question of how I endured it and did everything as you just described. Он постоянно отключается. Error code that the connection failed (error 8 GATT CONN TIMEOUT). On the part of the android, he writes that the characteristic was not found, in the third case, out of four connections, and then the device reboots on nrf52832.

  • nrf52832:

    BOARD_PCA10040
    CONFIG_GPIO_AS_PINRESET
    FLOAT_ABI_HARD
    INITIALIZE_USER_SECTIONS
    NO_VTOR_CONFIG
    NRF52
    NRF52832_XXAA
    NRF52_PAN_74
    NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3
    NRF_SD_BLE_API_VERSION=6
    S132
    SOFTDEVICE_PRESENT
    SWI_DISABLE0

    FLASH RX 0x00000000 0x00080000;RAM RWX 0x20000000 0x00010000

    FLASH_PH_START=0x0 
    FLASH_PH_SIZE=0x80000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x10000
    FLASH_START=0x26000
    FLASH_SIZE=0x5a000
    RAM_START=0x200022D8
    RAM_SIZE=0xDD28

    Debug -> Targer Device nrf52832_xxAA

    ../components/softdevice/s132/headers
    ../components/softdevice/s132/headers/nrf52

    nrf52810:

    BOARD_PCA10040
    CONFIG_GPIO_AS_PINRESET
    DEVELOP_IN_NRF52832
    FLOAT_ABI_SOFT
    INITIALIZE_USER_SECTIONS
    NO_VTOR_CONFIG
    NRF52810_XXAA
    NRF52_PAN_74
    NRFX_COREDEP_DELAY_US_LOOP_CYCLES=3
    NRF_SD_BLE_API_VERSION=6
    S112
    SOFTDEVICE_PRESENT
    SWI_DISABLE0

    FLASH RX 0x0 0x30000;RAM RWX 0x20000000 0x6000

    FLASH_PH_START=0x0 
    FLASH_PH_SIZE=0x30000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x6000
    FLASH_START=0x19000
    FLASH_SIZE=0x17000
    RAM_START=0x20001BD0
    RAM_SIZE=0xE430

    Debug -> Targer Device nrf52810_xxAA

    ../components/softdevice/s112/headers
    ../components/softdevice/s112/headers/nrf52

    sdk_config have also been changed to nrf52832 and tuned to my peripherals.


  • #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif

    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval.
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif

    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature.
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i> if the temperature has not changed.

    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif

    // <o> NRF_SDH_CLOCK_LF_ACCURACY - External clock accuracy used in the LL to compute timing.

    // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM
    // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM
    // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM
    // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM
    // <4=> NRF_CLOCK_LF_ACCURACY_75_PPM
    // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM
    // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM
    // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM
    // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM
    // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM
    // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM
    // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM

    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

  • hi,

    may i ask one question related to this post? i can see that NRF_SDH_CLOCK_LF_ACCURACY  is 1 and

    since 832 is 250ppm, so NRF_SDH_CLOCK_LF_ACCURACY should be 0?

  • These are the recommended settings for own board written on the forum.

Related