xQueueReceive not receiving the data

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

xQueueReceive not receiving the data

ソリューションへジャンプ
1,553件の閲覧回数
vinothkumars
Senior Contributor IV

Hi All,

 

I am working IMX8QM-MEK with SDK (2.5.1).

xQueueSend is able to send the data and return TRUE. But, xQueueReceive not able receive the data. 

 

 

Regards,
Vinothkumar Sekar
0 件の賞賛
1 解決策
1,516件の閲覧回数
vinothkumars
Senior Contributor IV

Hi @ErichStyger 

 

It is problem with Camera and display resource. I commented those resource uses and it's working

Regards,
Vinothkumar Sekar

元の投稿で解決策を見る

0 件の賞賛
5 返答(返信)
1,548件の閲覧回数
ErichStyger
Senior Contributor V

Hi @vinothkumars ,

it would be really good if you could share a bit more of the details, as there might be many causes for this, including some other task already consuming the data.

Or at least provide an reduced example to look at.

Erich

0 件の賞賛
1,542件の閲覧回数
vinothkumars
Senior Contributor IV

Thank you @ErichStyger 

 

for the quick reply. Please find the example code here,

 

vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QM/boards/mekmimx8qm/demo_apps/rear_view_camera/cm4_core1/automotive.c

 

int do_gear_state(struct cmd_tbl_s *cmd_tbl, int argc, char * const argv[])
{
vehicle_state_t vstate;
uint32_t gear_idx;
char *endptr;
if (argc != 2)
return CMD_RET_USAGE;

gear_idx = strtol(argv[1], &endptr, 0);

vstate.type = STATE_TYPE_GEAR;
vstate.value = gear_idx;

if(xQueueSend(xVStateQueue, (void *)&vstate, (TickType_t)0))
{
PRINTF("Sending gear ++++++++++++++++++ \r\n");
}else{
PRINTF("not able to Send gear ++++++++++++++++++ \r\n");
}

return 0;

}




static void vehicle_state_monitor_task(void *pvParameters)
{
EventBits_t resBits;
vehicle_state_t stateMsg;
uint8_t reqData[SRTM_USER_DATA_LENGTH];
static uint32_t pre_gear_state = AUTO_GEAR_NONE;
TaskHandle_t regHandle;

android_registered_flag = 0;
while (true)
{
PRINTF("+++++++++++++++++ %s ++++++++++++++++++ \r\n", __func__);
if (xQueueReceive(xVStateQueue, &stateMsg, portMAX_DELAY))
{

PRINTF("+++++++++++++++++ %s ++++++++++++++++++ 1\r\n", __func__);

}

}
Regards,
Vinothkumar Sekar
0 件の賞賛
1,537件の閲覧回数
ErichStyger
Senior Contributor V

Hi @vinothkumars ,

that code looks good in general, so I don't see an obvious problem.

What I would suggest:

- check your task stack sizes, if there is enough stack space available. You have

SRTM_USER_DATA_LENGTH

which potentially could be very large

- You need to check you code with the debugger: inspect the queue with the FreeRTOS views (see https://mcuoneclipse.com/2017/03/18/better-freertos-debugging-in-eclipse/)

 

I hope this helps,

Erich

0 件の賞賛
1,517件の閲覧回数
vinothkumars
Senior Contributor IV

Hi @ErichStyger 

 

It is problem with Camera and display resource. I commented those resource uses and it's working

Regards,
Vinothkumar Sekar
0 件の賞賛
1,533件の閲覧回数
vinothkumars
Senior Contributor IV

Thank you @ErichStyger for your reply.

Regards,
Vinothkumar Sekar
0 件の賞賛