8000 nrf52840: crash running heartrate example · Issue #310 · tinygo-org/bluetooth · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
nrf52840: crash running heartrate example #310
Open
@deadprogram

Description

@deadprogram

I tried to run the heartrate example with the latest dev branch of both this package and TinyGo, only to discover that it crashes:

$ tinygo flash -size short -target itsybitsy-nrf52840 -monitor ./examples/heartrate
   code    data     bss |   flash     ram
  41216    1464    4680 |   42680    6144
Connected to /dev/ttyACM0. Press Ctrl-C to exit.
Sread error: Port has been closed

Some println() debugging seems to indicate that this the line where it crashes:
https://github.com/tinygo-org/bluetooth/blob/release/examples/heartrate/main.go#L60

Changing that line to

return uint8(min)

allows the example to execute as expected.

Calling rand.Intn() function from a normal serial program without softdevice does not cause any problems.

Running the heartrate example on HCI or Linux does not cause any problems either.

I also experience this same crash on most recent TinyGo release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnext-releasenrfNordic Semi SoftDevice

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0