RTCS_create() returns "RTCSERR_CREATE_POOL_FAILED"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RTCS_create() returns "RTCSERR_CREATE_POOL_FAILED"

Jump to solution
2,433 Views
panpwr
Contributor IV

Hello,

When I am trying to use RTCS_create(), I am receiving "RTCSERR_CREATE_POOL_FAILED". I understand that it is somehow related to lack of message pool memory, but I don't know how to configure RTCS to overcome this porblem.

I've tried playing with the following values, and even with the following high values - the error persists:

_RTCS_msgpool_init   = 300;   //default = 32

_RTCS_msgpool_grow = 100;  //default = 16

_RTCS_msgpool_max  = 400;  //default = 160


My system has 2 message pools I've explicitly created by using _msgpool_create():

The first pool:

message_size = 9 bytes

num_messages = 10

grow_number = 0

grow_limit = 0 (unlimited)

The second pool:

message_size = 13 bytes

num_messages = 10

grow_number = 0

grow_limit = 0 (unlimited)

Please advise.

Thanks,

Lior.

Labels (1)
1 Solution
869 Views
panpwr
Contributor IV

Found the problem:

I've replaced the order of the calls so RTCS_Create will be first, and afterwards the 2 calls for _msgpool_create():

The RTCS_Create passed correctly, and so was the 1st _msgpool_create(). However, the 2nd _msgpool_create() call returned MSGPOOL_OUT_OF_POOLS error.

Looking at the MQX Reference manual I've realized that MAX_MSGPOOLS in the MQX initialization structure should be increased (and not the _RTCS_msgpool_* variables as I initially thought).


Therefore, I've updated the BSP_DEFAULT_MAX_MSGPOOLS value from mqx\source\bsp\<board_name>\<board_name>., recompiled BSP and PSP libraries - and it all went well.

View solution in original post

1 Reply
870 Views
panpwr
Contributor IV

Found the problem:

I've replaced the order of the calls so RTCS_Create will be first, and afterwards the 2 calls for _msgpool_create():

The RTCS_Create passed correctly, and so was the 1st _msgpool_create(). However, the 2nd _msgpool_create() call returned MSGPOOL_OUT_OF_POOLS error.

Looking at the MQX Reference manual I've realized that MAX_MSGPOOLS in the MQX initialization structure should be increased (and not the _RTCS_msgpool_* variables as I initially thought).


Therefore, I've updated the BSP_DEFAULT_MAX_MSGPOOLS value from mqx\source\bsp\<board_name>\<board_name>., recompiled BSP and PSP libraries - and it all went well.