Skip to content

uctypes for DMA CTRL reg #3

@mkrasuski

Description

@mkrasuski

RP2040 docs state that any write to CTRL on Alias 0 (DMA_CHAN_ADDRESS + 0xC offset) starts the transfer... You're mapping this 4 bytes to bitfields uctypes struct, so every write access to any bit field probably writes CTRL, i.e. starts DMA... Results may be unpredictable and hardly depend on sequence of field assignments. We should treat building of CTRL value in transactional manner (compute whole 32bit value and then assign) - C API does it this way. Probably your code works due to update to EN field as last operation, but this is pure luck

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions