Skip to content

HM01B0 PIO driver desync #19

@sfe-SparkFro

Description

@sfe-SparkFro

The HM01B0 PIO driver appears to have a desync issue, where bits and/or bytes are lost in the datastream, resulting in corrupted images.

As a test, I pointed the camera at the following test image:

Image

Sometimes the frame is mostly fine, but the top and/or bottom are corrupted:

Image

Image

Sometimes there are weird color shifts:

Image

Much of the time, there is a "static" appearance:

Image

Image

Sometimes all of these artifacts appear several times in a single image (this also has a significant shift in the color wheel's position to the left):

Image

I suspect this is caused by a desync with the pixel stream from the camera. I'm really not sure why this would be, because the driver uses the PIO and DMA with almost zero CPU input except for the vsync IRQ (I believe this finishes in ~100us from previous testing). It's especially bizarre, because I have some test code in Arduino that sets up the PIO and DMA in almost exactly the same way, and it works totally fine there.

The images above were captured by triggering the camera one frame at a time, so there shouldn't be any issues with the same buffer getting overwritten or anything like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions