UART6 serial output stops working in demo app [iMX RT106S/SLN-LOCAL2-IOT]

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

UART6 serial output stops working in demo app [iMX RT106S/SLN-LOCAL2-IOT]

2,633件の閲覧回数
lorky
Contributor I

Hello all,

I have an issue with serial output PRINTF macro in a task suddenly stops working, in the below code, after serial output with "x" chars in while loop, I don't get any further output on UART.

I did set a breakpoint in DbgConsole_Printf("4 4 4...\r\n") line and debugger stops and prints correctly that 11 chars have been written in return value of function, so I suppose that functions gets executed, but unfortunately I do not see any output in UART6 aafter output of the "x" chars in while loop.

So I'd be glad for any pointers how to debug this further as I am out of ideas for now.


Thanks & Regards,

Lorky

0 件の賞賛
返信
4 返答(返信)

2,611件の閲覧回数
lorky
Contributor I

Hi @kerryzhou 

the PRINTF() outputs you mentioned was to check only how far PRINTF() output is working in loval_voice_task(), and after printing 3-4 'X' chars, I verified with debugger that code executes into while(1) loop.

So I do get all PRINTF() outputs until PRINTF("X \r\n") and no further outputs below, especially the needed output for recognized commands (see attached code excerpt of local_voice_task() function, needed output is in lines 189/190 and 200/201:

configPRINTF(("%d\r\n", vocal2code(pInfCMD->iWhoAmI_lang, g_asrControl.result.keywordID[1])));
configPRINTF(("TEST\r\n"));

[...]

PRINTF("%d\r\n", vocal2code(pInfCMD->iWhoAmI_lang, g_asrControl.result.keywordID[1]));
PRINTF("TEST\r\n");

[...]

 

 

/*                  configPRINTF(("[ASR] Command: %s(%d) - MapID(%d)\r\n",
 *                                asr_get_string_by_id(pInfCMD, g_asrControl.result.keywordID[1]),
 *								  g_asrControl.result.keywordID[1], g_asrControl.result.cmdMapID));
 *                  configPRINTF(("%d",pInfCMD->iWhoAmI_lang));
*/
                	configPRINTF(("%d\r\n", vocal2code(pInfCMD->iWhoAmI_lang, g_asrControl.result.keywordID[1])));
 	 	 	 	 	configPRINTF(("TEST\r\n"));
                	if (appAsrShellCommands.cmdresults == ASR_CMD_RES_ON)
                    {
                        configPRINTF(("      Trust: %d, SGDiff: %d\r\n", g_asrControl.result.trustScore,
                                      g_asrControl.result.SGDiffScore));
                    }
/*                  PRINTF("[ASR] Command: %s(%d) \r\n",
 *                         asr_get_string_by_id(pInfCMD, g_asrControl.result.keywordID[1]),
 *                         g_asrControl.result.keywordID[1]);
// */
                	PRINTF("%d\r\n", vocal2code(pInfCMD->iWhoAmI_lang, g_asrControl.result.keywordID[1]));
 	 	 	 	 	PRINTF("TEST\r\n");

 

.

Unfortunately I have only MCU-LINK as debugger available not JLINK/SEGGER tool.

What do you mean by "it may works in other task wait something"? In debugger I only can see current task, if there is some task switching going on in between "APP Task", "Shell Task" and "Local_Voice Task", how could I debug this?

 

Thanks for any help & Best Regards,

Lorky

0 件の賞賛
返信

2,602件の閲覧回数
lorky
Contributor I

@kerryzhou 

 

Sorry to bother you again, but I did luckily have a second device to test and just flashed modified demo app to this device and with this device it works!

So there are additional output with this device (from app task I think) stating some information about WLAN firmware etc., that is not coming with my device... (pls see attached log from serial console)

And also all serial outputs of demo app are coming with this device, so I think somehow my first device has something wrong maybe in flash/filesystem area

So I'd be glad if you could give me some pointers why my original device seems to be broken regarding serial output?

 

Thank you & Best Regards,

Lorky

0 件の賞賛
返信

2,577件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @lorky ,

    Thanks for your updated information.

     Please tell me, why you need to add the printf in the original project?

    Do you just want to check the UART6 printf function, or want to use it as the debug log function.

     If just the UART6 printf funciton, you totaly can write a uart project download it directly.

     Now, how do you download the code to your board? With debugger or the serial download mode with the tools?

    MCU_LINK just support the CMSIS DAP, not the JLINK.

  In the original local2 project, uart6 is used to as the OTW function, so I am not suggest you printf any other log, it may make the OTW printf log messing.  

   If you just want to debug it, I highly recommend you find a JLINK to test it, that will more easy to use.

Talk back to your issues:

 WLAN firmware etc, this is used as the WIFI network, which also support the OTA, wireless communication.

  About your original  device, do you mean the uart is broken, or the voice detection is broken?

  If you suspect it is broken, you also can test some simple project to test, eg, the RT1060 SDK, led_blinky, hello world, but you need to change the code FCB from QSPI flash to hyperflash, as the local2 board is using the hyperflash.

 

Best Regards,

Kerry

 

 

 

  

    

 

0 件の賞賛
返信

2,624件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @lorky ,

  From your test result, the code should run in the following code:

kerryzhou_0-1692176390437.png

After sendout some X, then it may works in other task wait something.

Why you use this method to test the code?

If you want to debug, I highly recommend you use the JLINK as the debugger, then you can trace the code more clearly.

 

Best Regards,

Kerry

 

0 件の賞賛
返信