How to Switch Commom FPIO to DVP

  • ![What should I pay attention if I want to switch commom FPIO from k210 to DVP. My camera's io is 3.3V and I have changed to the 3.3V banks.But all I get back is FF.

  • @vowstar I don't know how to thank you, it is useful!

  • Staff


    I think I find the root cause.

    Please add this code in your project before initialize your camera.

    #include <sysctl.h>

    This code switch the DVP and LCD(SPI0) pins from dedicated 1.8V IO to the FPIOA, it may works.

    And, remove the sysctl_set_spi0_dvp_data(1);in your code.

    The reason why you get all data with 0xFF is the dedicated 1.8V IO floating with high level.

  • @vowstar Of couse I did that and I check it for twice😭😭😭😭😭

  • Staff

    @Faiz Did you really changed hardware and connect all VDDIO power to 3.3V?
    I've tested it on KD233 board, and use ov7725 camera with 3.3V IO and it works.
    Please check your hardware again and tie high both VDDIO pin and GPIO pin, and test whether the pin is 3.3V

  • @vowstar Sorry,I have changed it, but it still doesn't work.0_1545674630149_c8407fcc-c043-4f37-ad02-73e838193ba0-image.png

  • Staff

    DVP can set to normal IO bank (IO0 to IO47), and you must do additional things below:

    • Connect VDDIO group A, B and C to 3.3V

    • Switch all power bank under power group A, B and C.

      • Power group A including BANK0, BANK1 and BANK2
      • Power group B including BANK3, BANK4 and BANK5
      • Power group C including BANK6 and BANK7

      WARN: The IO which in the same power group must use the same VDDIO voltage and same sysctl_set_power_mode settings.

      This is a example which switch all IO bank to 3.3V VDDIO power
      Including <sysctl.h> and remove these codes in your project files

      /* Set all IO bank to 1.8V */
      /* VDDIO group A */
      sysctl_set_power_mode(SYSCTL_POWER_BANK0, SYSCTL_POWER_V18);
      sysctl_set_power_mode(SYSCTL_POWER_BANK1, SYSCTL_POWER_V18);
      sysctl_set_power_mode(SYSCTL_POWER_BANK2, SYSCTL_POWER_V18);
      /* VDDIO group B */
      sysctl_set_power_mode(SYSCTL_POWER_BANK3, SYSCTL_POWER_V18);
      sysctl_set_power_mode(SYSCTL_POWER_BANK4, SYSCTL_POWER_V18);
      sysctl_set_power_mode(SYSCTL_POWER_BANK5, SYSCTL_POWER_V18);
      /* VDDIO group C */
      sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18);
      sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18);

      Then add these codes

      /* Set all IO bank to 3.3V */
      /* VDDIO group A */
      sysctl_set_power_mode(SYSCTL_POWER_BANK0, SYSCTL_POWER_V33);
      sysctl_set_power_mode(SYSCTL_POWER_BANK1, SYSCTL_POWER_V33);
      sysctl_set_power_mode(SYSCTL_POWER_BANK2, SYSCTL_POWER_V33);
      /* VDDIO group B */
      sysctl_set_power_mode(SYSCTL_POWER_BANK3, SYSCTL_POWER_V33);
      sysctl_set_power_mode(SYSCTL_POWER_BANK4, SYSCTL_POWER_V33);
      sysctl_set_power_mode(SYSCTL_POWER_BANK5, SYSCTL_POWER_V33);
      /* VDDIO group C */
      sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V33);
      sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V33);

  • 0_1545670141281_9c9fea94-e17d-4b7e-96f8-d0ac8d732a29-image.png