PSOC6 FreeRTOS BLE Advertisement

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

cross mob
Max
Level 2
Level 2
5 questions asked 10 sign-ins 5 replies posted

Hello everyone,

I work on a project with CYBLE-416045-02 and FreeRTOS. Sometimes i have an error when BLE Task start, my stack go to ON state and advertisement start.

But for my advertisement, i have an error code  : 1600FF.

I would like to know if you have meet this kind of problem ? 

Best regards,

Max

0 Likes
1 Solution
PratikshaV
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @Max 

The error code 1600FF refers to CY_BLE_ERROR_INVALID_STATE you can refer this link for BLE advertisement Api description.

 

Thanks & Regards

Pratiksha V

View solution in original post

0 Likes
8 Replies
PratikshaV
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @Max 

Please can you refer the code examples for freeRTOS :

   1)CE218137 – PSoC 6 MCU with BLE Connectivity: BLE with Proximity(RTOS) 

   2)CE218138 – PSoC 6 MCU with BLE Connectivity: BLE Thermometer (RTOS)

Please let me know if this helps if not can you share your project where you are facing this issue so that we can reproduce it at our end.

Thanks & Regards

Pratiksha V

0 Likes
Max
Level 2
Level 2
5 questions asked 10 sign-ins 5 replies posted

Hi Pratiksha V,

I have start my project with :   2)CE218138 – PSoC 6 MCU with BLE Connectivity: BLE Thermometer (RTOS)

After take this example, i modified it to develop my own project.

I know that the problem come from when my Stack is ON, when this function is executed :

bleApiResult = Cy_BLE_GAPP_StartAdvertisement(
                            CY_BLE_ADVERTISING_FAST,
                            CY_BLE_PERIPHERAL_CONFIGURATION_0_INDEX); 

 Because my code error 1600FF come from bleApiResult :

  if(bleApiResult == CY_BLE_SUCCESS )
            {
                Task_DebugPrintf("Success  : BLE - Advertisement API", 0u);  
            }
            else
            {
                Task_DebugPrintf("Failure! : BLE - Advertisement API, "\
                                 "Error code:", bleApiResult); 
            }  

So i check the Cy_BLE_GAPP_StartAdvertisement function to understand return information where the type is : cy_en_ble_api_result_t

So with that information i arrive into a file named : cy_ble_stack.h where different error are defined but i don't understand which error my error code correspond.

0 Likes
PratikshaV
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @Max 

I am not able to reproduce this issue at my end .please can you share your project so that we can understand the issue better.

 

Thanks & Regards

Pratiksha V

0 Likes
Max
Level 2
Level 2
5 questions asked 10 sign-ins 5 replies posted

Hello PratikshaV,

Thanks for you help,

I check if i can send you more informations about the project,

But for you this error code not correspond in something in particular ? (in BLE library ?)

Best regards,

Max

0 Likes
PratikshaV
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @Max 

The error code 1600FF refers to CY_BLE_ERROR_INVALID_STATE you can refer this link for BLE advertisement Api description.

 

Thanks & Regards

Pratiksha V

0 Likes
Max
Level 2
Level 2
5 questions asked 10 sign-ins 5 replies posted

hi PratikshaV,

Thanks for this information,

I will look at this.

Best regards,

Max

0 Likes
Panometric
Level 5
Level 5
100 sign-ins 100 replies posted 10 solutions authored

@Max You should just be able to press F3 on the function , then it shows the return type is cy_en_ble_api_result_t , press F3 on that and it will show all the values. If this does not work (and it probably does not)  it's because your Eclipse is not setup right.  You need to add the directories where the header file cy_ble_stack.h resides to the  project settings. It is most likely "mtb-shared" This is one of the maddening things about Modus TB, in the default config, the compiler will find *.h files through the makefile but the IDE has no idea. 

Panometric_0-1647879674957.png

 

0 Likes
Max
Level 2
Level 2
5 questions asked 10 sign-ins 5 replies posted

Hello Panometric,

I use as IDE Psoc Creator 4.4 so i can't check exactly like that.

Best regards

0 Likes