OV5642 5MP SPI Burst Read Problem

Hello!

I try to connect this module to STM32WLE5CC with RIOT OS. I add some changes to STM32 code based on STM32F103 example. And it works perfect with only SINGLE_FIFO_READ (0x3D). If I’m trying BURST_FIFO_READ (0x3C) the module don’t send any of data.

Code
        CS_LOW();
            spi_transfer_regs(1, SPI_CS_UNDEF, BURST_FIFO_READ, NULL, photo_test, 64);
        CS_HIGH();
BURST FIFO READ timings

SINGLE_FIFO_READ

@Hocok
Thanks for your detail info. Have you refer to this detail timing here:
https://docs.arducam.com/Arduino-SPI-camera/Legacy-SPI-camera/Detailed-Data-Timing-on-Arducam-SPI-Bus/


Isuggest not to use the dma function to test if the burst works.
make sure each byte clock have some delay.

Hello @lvbin

spi_transfer_*** is not the DMA function, it’s just an usual spi read-write operation in the loop.

I just add read_reg(0x00) before starting burst reading and it starts work normally.

Code
        CS_LOW();
        spi_transfer_byte(1, SPI_CS_UNDEF, 1, ARDUCHIP_TEST1);
        CS_HIGH();

        CS_LOW();
            spi_transfer_regs(1, SPI_CS_UNDEF, BURST_FIFO_READ, NULL, photo_test, 64);
        CS_HIGH();

@Hocok
Hello, thanks for your further explanation. Got it.
But I think the phenomenon is so weird if just add one time dummy read can fixed the issue.
From the timing chart you attached, the clock is continuous. So I mislead it is a DMA operation.

1 Like