BLE disconnects immediately

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HeGi_2497906
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Urgent problem, been working on this for two days now.  I took a working program from a working board, using the same 012011 design, only difference is 3.3V on the new board vs. 5.0V on the working board.  BLE will not stay connected, no matter what I try.  I get the connection indication, and immediately get the disconnect.  I reviewed all the posts on the topics and checked out the connection settings and the system clock, no results, zero.  It connects, then immediately disconnects and the BLE host (Android) has to be restarted or it will not ever see the device.  Tells me that the stack is starting to connect and then faulting.

Looked at Subrs and Interrupts, tried isolating, nothing, commented out the BLE write/reads, nothing.  Cut my code down to nothing but CyBle_ProcessEvents();, still the same behavior.  I am really stuck and against a time line, I could really use a code/design review here, any suggestions are welcome.

Herb

0 Likes
1 Solution

Gyan, thank you again, BLE is now working fine!!!!

A suggestion, improve the posting and message with values you can input here, instead of just the hex values in the instruction, these values did not change with the code, so a big chance for an issue.

Thanks again, I really appreciate your support.

pastedImage_0.png

View solution in original post

0 Likes
3 Replies
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hello Herb,

  Set the ECO captrim values for CYBLE-012011 Module as per below link.

   ECO Capacitance Trim Values for EZ-BLE™ Modules - KBA218990

Basically you need to add the below line in the event CYBLE_STACK_ON.

     CY_SET_XTND_REG32((void CYFAR *)(CYREG_BLE_BLERD_BB_XO_CAPTRIM), 0xBCBC);

with above modification, I tested the project with no issues.

-Gyan

0 Likes

Gyan, thank you, I will be testing that this morning and will report back to you.  I did find that in the community, but was unsure what to do, and there is a dialog in the clock tab of the DWR, but it was in direct capacitance, and the discussion in the forum talked about changing the values, but since there were appropriate looking values there, and I could not check them against the hex number shown, I was unsure what to do.  I will check to see if adding this line changes the displayed values in the DWR dialog.

Thanks again, Herb

0 Likes

Gyan, thank you again, BLE is now working fine!!!!

A suggestion, improve the posting and message with values you can input here, instead of just the hex values in the instruction, these values did not change with the code, so a big chance for an issue.

Thanks again, I really appreciate your support.

pastedImage_0.png

0 Likes