Skip to content

FrequencyIO on CircuitPython 7.0.0 only returns 0. Same setup works with 6.3.0. #5643

@FevenKitsune

Description

@FevenKitsune

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit Feather M4 Express with samd51j19

Code/REPL

# CircuitPython 7.0
import frequencyio
import board
import time

frequency = frequencyio.FrequencyIn(board.D11)

# Loop while printing the detected frequency
while True:
    print(frequency.value)

    # Optional clear() will reset the value
    # to zero. Without this, if the incoming
    # signal stops, the last reading will remain
    # as the value.
    frequency.clear()
    time.sleep(0.1)

Behavior

Signal is generated with an external signal generator (-40.0mV-3.26v Pk-Pk, 1kHz Square Wave).

Serial output with CircuitPython 7.0.0:

0
0
0
0
0
...

Serial output with CircuitPython 6.3.0:

1000
1164
1000
1000
1058
...

Behavior is observed at higher frequencies as well.

Description

No response

Additional information

Did some debugging with @dhalbert on the Adafruit Discord server.

  • Swapped coax cable.
  • Validated normal GPIO operation with pin.
    Oscilloscope 1kHz Bug Report

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions