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

camera lib for nrf52 dk

Does any one have any library connect the nrf52 DK to a camera with GPIO?

Many thanks

Parents
  • I know we have some code ported to the nRF52 for the Arducam mini 2MP which uses SPI (data) and I2C (control) to communicate with the camera. If this is what you look for I will ask if we can make it public.


    UPDATE:

    Here is an example for PCA10040 or PCA10056 for ArduCAM mini 2MP:

    ArduCAM.zip

    cpplib.zip

    The example do not use the standard SDK drivers, but custom ones written in C++. The cpplib folder have to be placed under nRF5_SDK_13.0.0-1.alpha\components. The ArduCAM folder should be placed under nRF5_SDK_13.0.0-1.alpha\examples\MyProjects or similar folder.

    See the ArduCAM::spiTwiInit() function for which pins are used for the ArduCAM mini 2MP. If the VCC and GND pin on the ArduCAM are bent, the module can be directly connected in header P4: P0.22-P0.27 on PCA10040 (nRF52 DK), and P24: P1.09 - P0.13 on PCA10056 (nRF52840 PDK).

  • The ArduCAM uses a FPGA and a memory chip for frame buffering and to convert the parallell interface to SPI. You can see the power consumption in the specs on the site I linked to:

    Normal :5V/70mA
    Low power mode: 5V/20mA
    

    The fps may be less than you want as the site says:

    3~10fps video output at low resolution
    

    If you want to interface a camera you need a framebuffer. I would also guess you will get problems if you try to use parallell interface on the nRF, especially if you try to do other things as well in your code (for example using the SoftDevice). The gpio can be read at maximum 8 MHz (gpio peripheral runs at 16MHz) minus some CPU cycles (CPU runs at 64MHz) for storing the value and accessing the gpio again. But this needs to be synced with other signals so the actual read speed is probably be lower.

    SPI in comparison uses DMA so this can work in the background while you do other things in your code. Maximum clock for the SPI is 8MHz, so in theory 1MB/s.

    i don't know before tomorrow or friday if I can share the code with you.

Reply
  • The ArduCAM uses a FPGA and a memory chip for frame buffering and to convert the parallell interface to SPI. You can see the power consumption in the specs on the site I linked to:

    Normal :5V/70mA
    Low power mode: 5V/20mA
    

    The fps may be less than you want as the site says:

    3~10fps video output at low resolution
    

    If you want to interface a camera you need a framebuffer. I would also guess you will get problems if you try to use parallell interface on the nRF, especially if you try to do other things as well in your code (for example using the SoftDevice). The gpio can be read at maximum 8 MHz (gpio peripheral runs at 16MHz) minus some CPU cycles (CPU runs at 64MHz) for storing the value and accessing the gpio again. But this needs to be synced with other signals so the actual read speed is probably be lower.

    SPI in comparison uses DMA so this can work in the background while you do other things in your code. Maximum clock for the SPI is 8MHz, so in theory 1MB/s.

    i don't know before tomorrow or friday if I can share the code with you.

Children
No Data
Related