Skip to content

Update audiobusio.PDMIn to run clock constantly #446

Closed
@kattni

Description

@kattni

A number of the Circuit Playground Express boards have an onboard mic that, based on software reesearch, takes longer to initialise than others. (I specify software research to clarify that I did not determine this with a logic analyser or other hardware-specific testing.) This results in failure when trying to run code that uses a small buffer to record as there is no data being returned. This can be resolved by sampling a small slice at the end of a larger buffer, however, this causes massive latency issues.

Essentially, there is a delay between the beginning of PDMIn sending something along the clock pin to the mic, and the mic responding. Create a buffer of 160 bytes and no data will be returned. Create a buffer of 2016 bytes, and sample a slice of the last 160 bytes of the buffer, and sound data is returned.

The resolution would be to update audiobusio.PDMIn to run the clock constantly and then only record data when requested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions