Q: Atomic Register Access Upon Certain Registers
@Wren6991 is already working on this.
Since May 25, 2021.
Assessment
This issue has not been assessed yet.
Description
The effect of atomic register access as defined in RP2040 datasheet, Sect. 2.1.2 seems unclear to me when applied onto some specific registers.
Example 1: Atomic XOR on write (e.g. via hw_xor_bits()) applied onto PIO Register TXF0. This register is, as far as I understand, a write-only register, since it pushes a new data word into the FIFO. Applying XOR however requires knowledge about the bits of a previous value, but there is no previous value when pushing a new value into the FIFO. My guess is, that the XOR is applied against an assumed 0x0 value, i.e. resulting in the same effect as directly writing to the register without applying XOR. Is this correct?
Example 2: Atomic bit mask set and clear (e.g. via hw_set_bits() and hw_clear_bits) applied onto PIO Register INSTR_MEM0. The memory words are write-only. If atomic bit mask set and clear nevertheless worked, this would mean that you could non-destructively update the delay/side-set of an instruction without knowing what instruction is currently stored: Just clear/set the delay/side-set bits of an instruction with a mask that keeps all other bits of the instruction unmodified. Does this really work? My guess is no...
Also, the atomic register access is specified for write operations only. What will be the effect when reading from an address that is provided e.g. for atomic XOR write access?
- Dominant language
- No language data
- Stars
- 35
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/pico-feedback
-
documentation hardware pdf
Difficulty 1/5 Under an hour Newbie friendliness 92/100
raspberrypi/pico-feedback#503 ·
-
documentation pdf
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
raspberrypi/pico-feedback#485 ·
-
documentation rp2350
Difficulty 1/5 Under an hour Newbie friendliness 88/100
raspberrypi/pico-feedback#478 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
raspberrypi/pico-feedback#390 ·
-
documentation pdf rp2040 rp2350
raspberrypi/pico-feedback#501 · 1 comment · 1 assignee ·