You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
$ tinygo flash -size short -target pca10040-s132v6 -monitor ./examples/heartrate
code data bss | flash ram
38624 1356 4588 | 39980 5944
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
swd
Info : J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15
Info : Hardware version: 1.00
Info : VTarget = 3.300 V
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [nrf51.cpu] Cortex-M4 r0p1 processor detected
Info : [nrf51.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf51.cpu on 3333
Info : Listening on port 3333 for gdb connections
[nrf51.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000a80 msp: 0x20000400
** Programming Started **
Info : nRF52832-QFAA(build code: E0) 512kB Flash, 64kB RAM
Warn : Adding extra erase range, 0x0002fc30 .. 0x0002ffff
** Programming Finished **** Resetting Target **
shutdown command invoked
Connected to /dev/ttyACM0. Press Ctrl-C to exit.
BBBstarting
tick 00:00.009
SoftDevice assert
starting
tick 00:00.009
SoftDevice assert
starting
tick 00:00.009
SoftDevice assert
starting
tick 00:00.009
SoftDevice assert
The program does not crash, but it does not correctly publish the heart rate notifications. This same board does work correctly when running the scanner example.
I tried to run the heartrate example with the latest
dev
branch of both this package and TinyGo, only to discover that it crashes: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
allows the example to execute as expected.
Calling
rand.Intn()
function from a normalserial
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.
The text was updated successfully, but these errors were encountered: