This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

s140 pc-ble-driver 4.0.0 freezes when receiving too many data

I have a nRF52840-PCA10059 dongle.

I have a PCA10040 dev boeard on which I programmed the ble_app_hrs_freertos_pca10040_s132 example after I modified HEART_RATE_MEAS_INTERVAL and BATTERY_LEVEL_MEAS_INTERVAL variables (lines 100 and 95 of main.c) with value 10 (10ms for 100Hz).

If I connect this fast "Nordic_HRM" using nRF Connect (it programmed my dongle with API v3 SoftDevice, I can connect and get notifications from the device.

If I connect this fast "Nordic_HRM" using heart_rate_collector_v3 or heart_rate_collector_v6 example programs (compiled from https://github.com/NordicSemiconductor/pc-ble-driver/tree/v4.0.0), then I only get a few notifications and then the app freezes.

When it's frozen, using a debugger I can see that UartBoost::readHandler is not called anymore. If I press Enter (supposed to toggle notifications OFF), I see written

"Setting HRM CCCD"

I see:

UartBoost::readHandler receives: c0 10 0 0 f0 c0 c0 d6 6e 0 bc 1 9c 11 0 0 0 61 3e c0
SerializationTransport::readHandler receives: 1 9c 11 0 0 0

But "Received write response." never shows up. Looks like the soft device freezed and does not send my anything.

When using heart_rate_collector_v2 with a old nRF51 dongle, I observe no freezing.

When using heart_rate_collector_v3, I kept the SoftDevice programmed by "nRF Connect". Also tried with connectivity_4.0.0_usb_with_s132_3.1.0.hex, same behaviour observed.

When using heart_rate_collector_v6, I used connectivity_4.0.0_usb_with_s140_6.1.0.hex.

"Nordic HRM" unmodified device (low sampling rate) does not freeze.

Any ides what could cause this? What does nRF Connect make differently than heart_rate_collector sample?

Parents
  • Hi,

    Could you check which connection interval nRF Connect and the HR collector example is connected to the peripheral with? If you decrease the sample interval without lowering the connection interval, you might fill up the notification buffers, resulting in the device getting an error code and crashing. Can you also post the log output from the HR collector example that is output to the terminal when you run it?

    Best regards,
    Jørgen

  • Can you provide the modified HRS example, or did you only change the two parameters? If you could also provide a sniffer trace between the two connected devices with both pc-ble-driver and nRF Connect, that would also be helpful.

  • I only changed the two lines mentionned HEART_RATE_MEAS_INTERVAL and BATTERY_LEVEL_MEAS_INTERVAL. Can you let me know if you are able to reproduce the issue?

    I don't have the sniffer setup here and I remember having a hard time setting it up on my previous computer and it never helped solving any problem...do you really believe it would help here?

    I have the strong feeling that something wierd is going on. I experience this with both Win7 and Win10 for some time after a reboot. Then, at some point (like 15mn playing with this), things start working for good (no more freezing in HRM collector sample). Then, if I reboot, it starts freezing again...so please reboot before you test this if you wish to give it a try.

    If you cannot reproduce, then I promise I'll try to setup a sniffer...;-)

Reply
  • I only changed the two lines mentionned HEART_RATE_MEAS_INTERVAL and BATTERY_LEVEL_MEAS_INTERVAL. Can you let me know if you are able to reproduce the issue?

    I don't have the sniffer setup here and I remember having a hard time setting it up on my previous computer and it never helped solving any problem...do you really believe it would help here?

    I have the strong feeling that something wierd is going on. I experience this with both Win7 and Win10 for some time after a reboot. Then, at some point (like 15mn playing with this), things start working for good (no more freezing in HRM collector sample). Then, if I reboot, it starts freezing again...so please reboot before you test this if you wish to give it a try.

    If you cannot reproduce, then I promise I'll try to setup a sniffer...;-)

Children
No Data
Related