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

PSoC™ 6

SuRa_2245351
Level 4
First like received First like given
Level 4

I am using BLE with controller on CM0+ and host and profile on CM4. When I am reading RSSI value with core CM0+ in "sleep mode" received RSSI value changes with distance , but when core CM0+ is in "Deep sleep mode" , received RSSI value is -55dBm and remains constant irrespective of the change in distance.

0 Likes
1 Solution
MeenakshiR_71
Employee
100 likes received 50 likes received 25 likes received
Employee

Hello rautinst_2245351​,

Can you please try adding the below code to the CY_BLE_EVT_STACK_ON and see if that helps? I was able to get it to work with the below change.

case CY_BLE_EVT_STACK_ON:

            BLE->BLELL.LL_CONFIG &= ~0x41;

Looks like the point at which the radio measures the RSSI matters and the above modification makes the RSSI measurement at the end of the packet. Our default configuration measures it at the start. We are checking with our HW team on why this matters with deep sleep. We will update the implementation in the next PDL release.

Regards,

Meenakshi Sundaram R

View solution in original post

0 Likes
4 Replies
ShipingW_81
Moderator
Moderator 500 replies posted 250 solutions authored 250 replies posted
Moderator

Possible to attach a simple project to clarify this issue?

0 Likes
SuRa_2245351
Level 4
First like received First like given
Level 4

Fwan please see the basic program attached below. In main_cm0p.c if we set SLEEP_TYPE==DEEPSLEEP then RSSI value received is constant as -55 dBm, and if we select TYPE==SLEEP received RSSI value is varying as distance changes.

0 Likes
MeenakshiR_71
Employee
100 likes received 50 likes received 25 likes received
Employee

Hello rautinst_2245351​,

Can you please try adding the below code to the CY_BLE_EVT_STACK_ON and see if that helps? I was able to get it to work with the below change.

case CY_BLE_EVT_STACK_ON:

            BLE->BLELL.LL_CONFIG &= ~0x41;

Looks like the point at which the radio measures the RSSI matters and the above modification makes the RSSI measurement at the end of the packet. Our default configuration measures it at the start. We are checking with our HW team on why this matters with deep sleep. We will update the implementation in the next PDL release.

Regards,

Meenakshi Sundaram R

0 Likes
SuRa_2245351
Level 4
First like received First like given
Level 4

Thank you Madam for your response, I verified above code and it works fine in deepsleep mode. But when I use above code suggested by you in my actual project it does not advertise because device does not come out of "Cy_BLE_ProcessEvents()" function and enters infinite loop, since I am using "Unauthenticated pairing with encryption and Bonding requirement". But if I use "Unauthenticated pairing with encryption and No bonding requirement" then code in my actual project runs fine.

I have attached project to demonstrate the above issue.

0 Likes
Top labels