cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG_Stack_Initialization returning 0x48 => Hints are welcome

BauNu
Associate II

Hello,

I'm trying to get the Bluenrg m2 module working. For this I use a code based on the chat demo. But when calling "BlueNRG_Stack_Initialization" I get the return value 0x48. If I am right, this means BLE_STATUS_OUT_OF_MEMORY.

For details please see the Pictures...

But from my point of view the memory areas and sizes seem to be correct. Am I missing something?

Pleas let me know if more information is needed.

Thanks!

0693W0000000KJbQAM.png

0693W0000000KXhQAM.png

6 REPLIES 6
SSimo.2
Associate

This error may appear when you forget to define BLE_STACK_CONFIGURATION and BLUENRG2_DEVICE constants.

BauNu
Associate II

Thank you for your answer!

Do you mean this one in BLE_config.h:

/* This structure contains memory and low level hardware configuration data for the device */
const BlueNRG_Stack_Initialization_t BlueNRG_Stack_Init_params = {
    (uint8_t*)stacklib_flash_data,
    FLASH_SEC_DB_SIZE,
    FLASH_SERVER_DB_SIZE,
    (uint8_t*)stacklib_stored_device_id_data,
    (uint8_t*)dyn_alloc_a,
    TOTAL_BUFFER_SIZE(NUM_LINKS,NUM_GATT_ATTRIBUTES,NUM_GATT_SERVICES,ATT_VALUE_ARRAY_SIZE,MBLOCKS_COUNT,CONTROLLER_DATA_LENGTH_EXTENSION_ENABLED),
    NUM_GATT_ATTRIBUTES,
    NUM_GATT_SERVICES,
    ATT_VALUE_ARRAY_SIZE,
    NUM_LINKS,
    0, /* reserved for future use */
    PREPARE_WRITE_LIST_SIZE,
    MBLOCKS_COUNT,
    MAX_ATT_MTU,
    CONFIG_TABLE,
};

And the Prerocessor Macros:

BLE_STACK_CONFIGURATION=BLE_STACK_FULL_CONFIGURATION

BLUENRG2_DEVICE

I think it's all there. It's based on the Chat demo.

Dann
Associate II

HI @BauNu​ 

did you solve this issue? I have the same problem when creating a new project in WiSE studio, all the files seems to be OK (automatically generated or imported from example). Imported example project also works well but I'd like to create entire new local project (directory order in examples is a little mess).

Hey, did you solve this issue?

Dann
Associate II

Yes I did but it was long time ago so I don't remember exact steps. I only remember that I started from changing to BLE_STACK_BASIC_CONFIGURATION and it removed an error at the beginning so I could examine the code by debugging and turning on functionalities one by one. Eventually I use BLE_STACK_FULL_CONFIGURATION without any issue.

BauNu
Associate II

Hey,

I didn't solve the issue. I switched to another device, but I am also interested, what the solution is.