Skip to content

Precise Synchronization of multiple PIO Blocks #16387

Discussion options

You must be logged in to vote

Haven't tested it, but this should sync'em down to a few ns.

#!/micropython
# -*- coding: UTF-8 -*-
# vim: fileencoding=utf-8: ts=4: sw=4: expandtab:

@micropython.asm_thumb
def syncem(r0, r1):
    mov(r2, 0xf)
    mov(r3, 8)
    lsl(r2, r3)
    str(r2, [r0, 0])
    str(r2, [r1, 0])

syncem(0x50200000, 0x50300000)

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@mendenm
Comment options

@GitHubsSilverBullet
Comment options

@mendenm
Comment options

@GitHubsSilverBullet
Comment options

@mungewell
Comment options

Answer selected by mungewell
Comment options

You must be logged in to vote
1 reply
@mendenm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants