STM32U575 GPDMA DCMI High resolution image
Hi
I've been struggling trying to get an Image from a Image sensor over DCMI via the GPDMA on an STM32U575.
The image sensor has a resolution of 752*480, though I only want to capture 420*420, which I've configured on the sensor to output. I've also configured it to output a B&W image meaning I only get one byte per pixel.
I've used the DCMI_ContinousCap_EmbeddedSychMode example as the basis for my code, though I'm not using an omnivision sensor so I've swapped out the configuration for one required for my image sensor. However, for the most part, I have not modified the GPDMA or linked list settings from this example, just the I2C comms (swapped to SPI) and DCMI to external synchro, and DCMI polarities to match my image sensors output.
when I try to pull a full image in one DMA transfer, I get an overflow error after only receiving half the image (88200 bytes). When I make the image size 360*360 I get the full image just fine (129600 bytes).
I did try splitting this into 3 requests of 420*140, after receiving the first of these 3 requests the DCMI remains in the busy state and never returns to a ready state, if I force it into the ready state in the line callback, it goes into the ready state but then fails to start on the next HAL_DCMI_Start_DMA call.
I also tried adding additional nodes to my linked list, the original example had 2 set up, I've attempted adding 2 additional nodes with the same settings and this didn't work either.
Also I am never getting a DCMI_FLAG_FRAMERI interrupt, even if I set my image size to 16*16 I get all 256 bytes but I don't receive an interrupt, instead I get a line interrupt. I can see my VSYNC line going high from my image sensor.
I am curious as to what the STM treats as "active high" in the DCMI parameter settings related to synchronization, does "active" mean in the process of receiving data or syncing at the end of a given line or frame. The reason I'm asking is that if it's active in the state that it is receiving data (pixels being output), I'm getting nothing in terms of data, only when i set these to the opposite of what my sensors datasheet states do I receive any data, this datasheet explicitly states that the LEN and FEN (vsync and hsync equivalent) are active low (0 means that pixels are being output).
I've attached my ioc used to generate my code.
I call in my main:
MX_DCMIQueue_Config();
HAL_DMAEx_List_LinkQ(&handle_GPDMA1_Channel12, &DCMIQueue);
__HAL_LINKDMA(&hdcmi, DMA_Handle, handle_GPDMA1_Channel12);
I initialise my sensor then call:
HAL_DCMI_Start_DMA(ev76c541Dcmi, DCMI_MODE_SNAPSHOT, (uint32_t)Buff1, TRANSFER_LEN / 4);
where TRANSFER_LEN is 176400
There isnt really anything outside of this that i'm doing in my code I just wait in a while one loop waiting for the transfer to complete then check my buffer and dcmi->State after a period of time.
Thanks and regards
Jack
