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.
已解决! 转到解答。
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.
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.