probe_oen.pio doesn't set SWCLK as a sideset pin

Open
#196 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c
Domain
embedded-iot

Research direction

Compare the sideset configuration in src/probe.pio around line 104 with src/probe_oen.pio around line 83. Read the surrounding PIO setup to determine whether probe_oen.pio should configure SWCLK as a sideset pin or whether its comment is incorrect. Done means the intended behavior is established and the code and comment agree.

Written by the indexing model from the issue text.

Description

Whilst looking at #194 I noticed that probe.pio says:

    // Set SWCLK as a sideset pin
    sm_config_set_sideset_pins(sm_config, PROBE_PIN_SWCLK);

(i.e. the comment matches the code), whereas probe_oen.pio says:

    // Set SWDIOEN and SWCLK as sideset pins
    sm_config_set_sideset_pins(sm_config, PROBE_PIN_SWDIOEN);

i.e. despite what the comment says, it doesn't actually set SWCLK as a sideset pin.

Not being familiar with how this code works, I don't know if probe_oen.pio is accidentally missing a sm_config_set_sideset_pins(sm_config, PROBE_PIN_SWCLK); line, or whether the comment simply needs updating to // Set SWDIOEN as a sideset pin ? 🤷‍♂️

Dominant language
C
Stars
1.2k
Forks
363
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/debugprobe

All issues in raspberrypi/debugprobe

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.