Post 62S2 Wi-Fi BT Pioneer Kit enter deep sleep during long delay

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

cross mob
lock attach
Attachments are accessible only for community members.
chwaitang
Level 3
Level 3
First solution authored 25 sign-ins 10 replies posted

Hi,

I have encountered this problem.

When I call  scan_to_get_security() in my AP connect function, it gets stuck in CY_ASSERT line inside the function 

__WEAK void vApplicationSleep(TickType_t xExpectedIdleTime) in cyabs_freertos_helpers.c from calling function of with the calling function  cy_wcm_stop_scan()

I have attached screen capture of 3 shots showing scan_to_get_security(), icm connect calling function and cyabs_freertos_helpers.c .

I have tried the suggestion of increasing  CY_CFG_PWR_DEEPSLEEP_LATENCY  define in cycfg_system.h to ridiculously large number of 50000000UL with same result. I have also try reading up on PsoC 6 power modes but can find no clue as to what is the cause. 

This seems to happen randomly with my PSoC6 eval kit and I suspect the previous issue of I2C timeout in M0 processor may also be related to this. (Note: The modified I2C init package by another moderator which moves the entire bsp init over to M0 still shows the same problem described in another post.

 

Please advise

Thanks and Warm Regards

CW

 

0 Likes
1 Solution
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Yes, the cy_wcm_stop_scan() actually tries to get a semaphore(stop_scan_semaphore) at the end of the function. Because the initial count of this semaphore is 0 and the get_semaphore suspends the thread if the initial count is zero, that's why you're facing this issue. Please set the initial count to 1 in the cy_rtos_init_semaphore(&stop_scan_semaphore, MAX_SEMA_COUNT, 1(previously 0))

This API is present in cy_wcm.c inside the function cy_wcm_init().

Let me know if you still face the issue.

Thanks

Aditi

View solution in original post

0 Likes
1 Reply
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Yes, the cy_wcm_stop_scan() actually tries to get a semaphore(stop_scan_semaphore) at the end of the function. Because the initial count of this semaphore is 0 and the get_semaphore suspends the thread if the initial count is zero, that's why you're facing this issue. Please set the initial count to 1 in the cy_rtos_init_semaphore(&stop_scan_semaphore, MAX_SEMA_COUNT, 1(previously 0))

This API is present in cy_wcm.c inside the function cy_wcm_init().

Let me know if you still face the issue.

Thanks

Aditi

0 Likes