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

  • Furthermore, how do I debug using the SWDCLK/SWDIO? I already connected them to the P20 SWD of the DK, but what other steps must I take? I have read the discussion Program the pca10059 with pca10056 that the D- and D+ must be cut. Are those the SB3 and SB4 bridges? What else must I do? Do I still need to plug the dongle into the USB port for power, and must the DK also be connected to my pc? 

    Thanks in andvance!

  • As long as the SWDIO and SWDCLK pins are connected to P20 of the DK, you should only have to power the Dongle with the same voltage level that the DK is running at (3.0V), and connect the VTG pin of P20 header to VDD on the DK. If you power the dongle through the USB port, the default voltage should be 3.0V, but make sure you do not do an eraseall operation from the debugger (see previously linked tutorial for details).

    I do not see any reasons you should need to cut the D+/- lines of the USB port. It looks like the user in that thread have modified the dongle to connect SWDIO/CLK to the D+/- pads.

Reply
  • As long as the SWDIO and SWDCLK pins are connected to P20 of the DK, you should only have to power the Dongle with the same voltage level that the DK is running at (3.0V), and connect the VTG pin of P20 header to VDD on the DK. If you power the dongle through the USB port, the default voltage should be 3.0V, but make sure you do not do an eraseall operation from the debugger (see previously linked tutorial for details).

    I do not see any reasons you should need to cut the D+/- lines of the USB port. It looks like the user in that thread have modified the dongle to connect SWDIO/CLK to the D+/- pads.

Children
No Data
Related