faill to init shell, implementing shell into an application

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

faill to init shell, implementing shell into an application

ソリューションへジャンプ
1,176件の閲覧回数
claudecdg66
Contributor II

Hello,

I've started a project from an example(lpi2c_pooling) and i want to add a shell structure to it. However the init of the shell crash when it come to those lines

status = SerialManager_OpenReadHandle(shellContextHandle->serialHandle, shellContextHandle->serialReadHandle);
    assert(kStatus_SerialManager_Success == status);

SerialManager_OpenReadHandle return with that its busy cause the function can't turn off DisableGlobalIRQ().

what could be the problem here?

Also don't tell me to try the example code first, i did but now i need to integrate it into my application.

I joined the code so you can help me debug it.  im using the eval kit for the i.mx rt 1010 processor.

ラベル(1)
タグ(1)
1 解決策
1,086件の閲覧回数
Sabina_Bruce
NXP Employee
NXP Employee

Hello Claude,

Hope you are doing well.

I'd recommend to grab the hello world example and using the BOARD_InitDebugConsole(); function as reference to initialize what you'd like to work with. Once you have it working in this example you may merge them together with your custom application.This function uses the SerialManager_OpenReadHandle and you may see how it is used.In addition if you would like to understand the API here is the link for more details on the functions and returned status.

MCUXpresso SDK API Reference Manual: Serial Manager 

Also check what is returned. The reading handle can not be opened multiple at the same time. The error code kStatus_SerialManager_Busy would be returned when the previous reading handle is not closed. And there can only be one buffer for receiving for the reading handle at the same time.

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

元の投稿で解決策を見る

3 返答(返信)
1,087件の閲覧回数
Sabina_Bruce
NXP Employee
NXP Employee

Hello Claude,

Hope you are doing well.

I'd recommend to grab the hello world example and using the BOARD_InitDebugConsole(); function as reference to initialize what you'd like to work with. Once you have it working in this example you may merge them together with your custom application.This function uses the SerialManager_OpenReadHandle and you may see how it is used.In addition if you would like to understand the API here is the link for more details on the functions and returned status.

MCUXpresso SDK API Reference Manual: Serial Manager 

Also check what is returned. The reading handle can not be opened multiple at the same time. The error code kStatus_SerialManager_Busy would be returned when the previous reading handle is not closed. And there can only be one buffer for receiving for the reading handle at the same time.

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

1,086件の閲覧回数
claudecdg66
Contributor II

I founded the problem

/*!@ brief Whether enable the RX function
 * If the macro is zero, the receive function of the debug console is disabled.
 */
#ifndef DEBUG_CONSOLE_RX_ENABLE
#define DEBUG_CONSOLE_RX_ENABLE (0U)
#endif /* DEBUG_CONSOLE_RX_ENABLE */

DEBUG_CONSOLE_RX_ENABLE was at 1 while in the example it was to 0 not the code work.

0 件の賞賛
1,086件の閲覧回数
claudecdg66
Contributor II

That's interesting but witch other handle is blocking the api i didn't add one and the rest of the code is exactly like the example. i even used beyond compare to be sure.

0 件の賞賛