Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Turning camera off in nrf52-ble-image-transfer-demo for nRF52840 Dongle

Hello everyone, I'd like to implement the nrf52-ble-image-transfer-demo for nRF52840 Dongle. The normal code already plays well. However, since I am aiming for a low-power application, I need to somehow put the camera in sleep mode while it is not used. Since I've found no such code or method, I simply turn it off completely using MOSFET. This worked well for the big nRF52840. I simply introduced a camera_init_new() function to initialize the camera before every Take Picture command. The only problem here I have is that I need to put in a delay after the camera init, I think this is due to the fact that the camera needs some time to initialize. 

However, this does not work for the Donlge. The whole thing simply crashes as soon as I send the take picture command. Funny though that after it crashes it performs some kind of reset, meaning that I get automatically disconnected and can connect again.

Anyone an idea where the problem might be?

Parents
  • Hi,

    Did you build the application for the pca10059, or did you run the pca10056 build on the dongle? Did you make any other modifications to the example to get it running on the Dongle? Do you use the same GPIOs (if not, which GPIOs do you use?), did you disable UART, etc?

    The reset behavior is typically due to an error/assert in the application, where the default behavior is to do a soft reset in the error handler. 

    Do you have debug capabilities on your dongle? I.e., do you use a debugger to program the dongle, or do you use the bootloader solution that comes with the dongle to program it over the USB port?

    Best regards,
    Jørgen

  • Hi Jørgen,

    I made all the modifications necessary to run the normal example on the Donlge. Like disabling UART, change the application to be build for pca10059, changed the GPIOs as well like so:

    #elif defined(BOARD_PCA10059)
    m_camera_init.pinScl = 32;
    m_camera_init.pinSda = 24;
    m_camera_init.pinSck = 22;
    m_camera_init.pinMiso = 20;
    m_camera_init.pinMosi = 17;
    m_camera_init.pinCsn = 15;

    The Image demo example does run without problems, only when I introduce the code which disables the camera via MOSFET does it crush. However, the same does not happen on the normal nrf52840. The GPIO I use for the gate of the MOSFET is pin 1.10 (I address it in the code with 32+10).

    I do not have any debug capabilities, how could I using the Dongle? I use the bootloader solution with nRF programmer over the USB port.

    Thanks for your help!

    Paul

Reply
  • Hi Jørgen,

    I made all the modifications necessary to run the normal example on the Donlge. Like disabling UART, change the application to be build for pca10059, changed the GPIOs as well like so:

    #elif defined(BOARD_PCA10059)
    m_camera_init.pinScl = 32;
    m_camera_init.pinSda = 24;
    m_camera_init.pinSck = 22;
    m_camera_init.pinMiso = 20;
    m_camera_init.pinMosi = 17;
    m_camera_init.pinCsn = 15;

    The Image demo example does run without problems, only when I introduce the code which disables the camera via MOSFET does it crush. However, the same does not happen on the normal nrf52840. The GPIO I use for the gate of the MOSFET is pin 1.10 (I address it in the code with 32+10).

    I do not have any debug capabilities, how could I using the Dongle? I use the bootloader solution with nRF programmer over the USB port.

    Thanks for your help!

    Paul

Children
No Data
Related