CY_BLE_ERROR_INSUFFICIENT_RESOURCES

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

cross mob
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

First the basic info: I'm running on a CYBLE-41605-02 module with FreeRTOS. BLE PDL v2.20. Dual CPU configuration (stack on cm0, main code on cm4).

Gap security settings:

  pastedImage_0.png

The following code is used to start up the BLE system.

    /* Start the UART debug port */

    UART_DEBUG_START();

    DEBUG_PRINTF("\r\n\nPSoC 6 MCU with BLE Find Me Code Example \r\n");   

   

     /* Start Host of BLE Component and register generic event handler */

    apiResult = Cy_BLE_Start(StackEventHandler);

   

    if(apiResult != CY_BLE_SUCCESS)

    {

        /* BLE stack initialization failed, check configuration,

           notify error and halt CPU in debug mode */

        DEBUG_PRINTF("Cy_BLE_Start API Error: %x \r\n", apiResult);

        ShowError();   

    }

    else

    {

        DEBUG_PRINTF("Cy_BLE_Start API Success: %x \r\n", apiResult);

    }

   

   apiResult = Cy_BLE_GetStackLibraryVersion(&stackVersion);

   

    if(apiResult != CY_BLE_SUCCESS)

    {

        DEBUG_PRINTF("Cy_BLE_GetStackLibraryVersion API Error: 0x%2.2x \r\n", apiResult);

        ShowError(); 

    }

    else

    {

        DEBUG_PRINTF("Stack Version: %d.%d.%d.%d \r\n", stackVersion.majorVersion,

            stackVersion.minorVersion, stackVersion.patch, stackVersion.buildNumber);

    }

   

    /* Register IAS event handler */

    Cy_BLE_IAS_RegisterAttrCallback(IasEventHandler);

  

This code results in the following console output:

pastedImage_1.png

I'm pretty sure the error code is for CY_BLE_ERROR_INSUFFICIENT_RESOURCES. I assume this line is popping up because generating security keys is part of the ble stack start-up process. But I am clueless as to what is causing the error message, how to fix it, or even it is significant.

Anybody have any insights into this?

Thanks,

Ed H.

0 Likes
5 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

What is the security configuration for your project? Please set different security settings and try calling the API.

Can you please attach your project?

Are you getting the error if you directly use the FindMe code example without any modifications?

Thanks

Ganesh

0 Likes

The security settings are included in my very first post.

I am having to deal with some emergencies on a couple of other projects and I have some business travel scheduled, so I may be a tad slow to follow up on this. But I will try alternate security settings to see if that makes a difference.,

Due to the proprietary content of the software, I cannot send it “as is”. I will also try to make a stripped down version that I can send. As soon as I can get to it. ☺

0 Likes

The error occurs when I have the Bonding option selected.

It is my understanding that the BLE system will store the bonding information in EEPROM. Right now my program doesn't use the EEPROM at all (other than maybe this behind-the-curtain use). Do I need to do something in the linker files to allocate an EEPROM segment for the BLE system? Not having an EEPROM segment available would seem to fit with the "insufficient resources" error.

Or is it something else entirely?

Thanks,

Ed H.

0 Likes

Hi Ed,

Is my understanding that the BLE system will store the bonding information in EEPROM. Right now my program doesn't use the EEPROM at all (other than maybe this behind-the-curtain use). Do I need to do something in the linker files to allocate an EEPROM segment for the BLE system? Not having an EEPROM segment available would seem to fit with the "insufficient resources" error. Or is it something else entirely?

To answer this question, the BLE bonding information is stored in the Flash memory only. There is no need for any Emulated EEPROM or external EEPROM. There is no need for any Linker script changes. So the issue is not related to Emulated EEPROM.

Kindly attach the truncated version of your project. We will analyze it and get back to you.

Thanks

Ganesh

0 Likes

Hmm... I now have a truncated version available, but this system won't post a reply if I include a zipped attachment. It looks like you have to use the advanced editor to do an attachment, but when I hit add reply I just get a small circle with a slash through it.

How am I supposed to do this?

0 Likes