Skip to content

pulseio PulseIn causes hard crashes #8726

Closed
@thandal

Description

@thandal

CircuitPython version

Adafruit CircuitPython 8.2.7 on 2023-10-19; Adafruit Metro M4 Express with samd51j19

Code/REPL

import pulseio
import time
import board

pulses = pulseio.PulseIn(board.D2)

while (1):
    print(time.monotonic())

Behavior

I have a wire connected to D2, but its not connected to anything else.

If I save this file to the board a few times (causing soft resets), or wave my hand near the wire, or just wait for a while, I get a hard crash:
'''

| 8.2.7Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Please file an issue with your program at github.com/adafruit/circuitpython/issues.
Press reset to exit safe mode.
'''

Description

If I comment out the "pulses = ..." line, the board becomes rock solid. I can't get it to hard crash with any number of saves, resets, touching the wire, etc, etc.

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions