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

TWI_scanner example for nRF52840 Dongle

Hi, I try to adopt the twi_scanner example from the peripheral examples to the nRF52840 Dongle.

I followed the process in the following link with no success though.

https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/nrf52840-dongle-programming-tutorial

What can I do to make it work?

Thank you

Parents
  • Hi.

    Which part gave you problems?

    Best regards,

    Andreas

  • Hi, I think I made it.

    Initially, I copied the pca10059 flash_placement file

    of the blinky project inside my twi_dongle project.

    But when I changed it with the one of the pca10056( blinky project) the whole thing worked .

    I don't get it. How does the pca10059 (dongle)  work with the flash_placement file of pca10056

    but not with the flash_placement file of pca10059?

    Thank you

  • Hi.

    I'm glad you made it.

    I'm a bit unsure on what steps you took when you did this.

    I made it work by doing the following:

    1) I made a copy of the folder pca10056 in the examples\peripheral\twi_scanner folder, and renamed it pca10059.

    2. I opened the project found in the ses folder, and just followed the tutorial:

    Step 1: Update the Preprocessor Definitions by removing BOARD_PCA10056 and inserting BOARD_PCA10059:

    Step 2: Adjust the linker configuration. Set FLASH_START=0x1000 to place the application right above the MBR. You should also set FLASH_SIZE=0xDF000 to make sure that there is room for the bootloader at the end of the flash. Set RAM_START=0x20000008, as the first 8 bytes are used by the MBR for interrupt forwarding and adjust the size accordingly by setting RAM_SIZE=0x3FFF8.

    3) I had to defined two pins in pca10059.h (components\boards\pca10059.h):

    // Arduino board mappings
    #define ARDUINO_SCL_PIN             NRF_GPIO_PIN_MAP(0,13)    // SCL signal pin
    #define ARDUINO_SDA_PIN             NRF_GPIO_PIN_MAP(0,15)    // SDA signal pin

    Since these two are used in the twi_init() function in main.c

    Best regards,

    Andreas

  • Yes it absolutely works that way. I just thought I should change the flash_placement file with the one of pca10059 (for the dongle) too. That's why it did not work.

    Thank you for your help

Reply Children
No Data
Related