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

  • Paul M. said:
    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).

    What exactly does this function do? Can you post the code?

    Paul M. said:
    I do not have any debug capabilities, how could I using the Dongle?

    You can solder a 10-pin debug header on the back of the dongle (e.g. this), and use a cable between this and the debug output (P19) port of a nRF52xxx DK. Alternatively, you can solder headers/pins to the SWDCLK/SWDIO pads close to the USB port on the dongle and connect these to the P20 SWD debug output pins on the DK to debug the application. It is also possible to use a TC2050 cable from Tag-Connect.

    We highly recommend adding debug capabilities if you are planning to develop applications for the dongle. If not, it is very hard for us to help you with any issues. The dongle is mainly intended for use with out development tools/precompiled applications.

    For more details, see the nRF52840 Dongle programming tutorial.

Reply
  • Paul M. said:
    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).

    What exactly does this function do? Can you post the code?

    Paul M. said:
    I do not have any debug capabilities, how could I using the Dongle?

    You can solder a 10-pin debug header on the back of the dongle (e.g. this), and use a cable between this and the debug output (P19) port of a nRF52xxx DK. Alternatively, you can solder headers/pins to the SWDCLK/SWDIO pads close to the USB port on the dongle and connect these to the P20 SWD debug output pins on the DK to debug the application. It is also possible to use a TC2050 cable from Tag-Connect.

    We highly recommend adding debug capabilities if you are planning to develop applications for the dongle. If not, it is very hard for us to help you with any issues. The dongle is mainly intended for use with out development tools/precompiled applications.

    For more details, see the nRF52840 Dongle programming tutorial.

Children
No Data
Related