RTCS_create() returns "RTCSERR_CREATE_POOL_FAILED"

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

RTCS_create() returns "RTCSERR_CREATE_POOL_FAILED"

跳至解决方案
2,206 次查看
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.

标签 (1)
1 解答
642 次查看
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.

在原帖中查看解决方案

1 回复
643 次查看
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.