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

task threads blocking the device connection.

I'm using the NRF52840 SDK 15.0.0

I have 2 task threads and 5 ble services.

Now what happens is when I'm trying to connect the device with 2 tasks and ble services I'm unable to connect/pair the nrf52 device.

When I comment on one task the device getting paired.

  TASK_MANAGER_CONFIG_STACK_SIZE 4096 

can anyone help me what was the mistake I'm done?

 

Parents
  • Can you tell how your firmware fails? A heap/memory problem would crash the firmware. Other kinds of problems may prevent the connection, but you will still be able to confirm the firmware runs without issue by pausing and continuing the debugger. 

  • Present heap size is 1024

    stack size is 2048

    if I want to increase those size what is the value? how it is calculated?

    How did my firmware fail?

    When I power ON my device and trying to connect my device with nrf connect application.

    When I click on connect in nrf connect application it will be in connecting state Foronly not able to connect the device you can see in below photo. 

    On application in logs I found this error: Error34(0x22):GATT CONN LMP TIMEOUT

    for this I tried to comment on one task then the device is connected immediately.

    This is the situation I want those tasks also.

Reply
  • Present heap size is 1024

    stack size is 2048

    if I want to increase those size what is the value? how it is calculated?

    How did my firmware fail?

    When I power ON my device and trying to connect my device with nrf connect application.

    When I click on connect in nrf connect application it will be in connecting state Foronly not able to connect the device you can see in below photo. 

    On application in logs I found this error: Error34(0x22):GATT CONN LMP TIMEOUT

    for this I tried to comment on one task then the device is connected immediately.

    This is the situation I want those tasks also.

Children
Related