![]() When the output messages are repeatedly output (comment out the Line_B), the messages are not properly output as seen in fig4. It seems that the output is done before USB connection is established. Nothing appears on console at all as seen in fig3. If you skip “APP_PRE_STATE_SERVICE_TASKS state” in APP_Tasks function (uncomment the Line_A). SYS_CONSOLE_Write(nsole0Handle, "***Test USB Console***\n\r", sizeof("***Test USB Console***\n\r")) ĪppData.state = APP_STATE_ERROR // <- Line_B SYS_CONSOLE_MESSAGE("\n\r\n\r***Console Test*** \n\rabcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890\n\r") * Send a message on USB console instance 1 */ If (SYS_CONSOLE_DeviceGet(nsole0Handle) = SYS_CONSOLE_DEV_USB_CDC) appData.state = APP_STATE_SERVICE_TASKS // <- Line_A }Ĭase APP_PRE_STATE_SERVICE_TASKS: //Wait for USB connection If (nsole0Handle != SYS_CONSOLE_HANDLE_INVALID)ĪppData.state = APP_PRE_STATE_SERVICE_TASKS * Get handles to both the USB console instances */Īnsole0Handle = SYS_CONSOLE_HandleGet(SYS_CONSOLE_INDEX_0) ![]() If (SYS_CONSOLE_Status(SYS_CONSOLE_INDEX_0) = SYS_STATUS_READY)ĪppData.state = APP_STATE_GET_CONSOLE_HANDLE */Ĭase APP_STATE_WAIT_USB_CONSOLE_CONFIGURED: * Check the application's current state. The Project Graph is shown in the attached fig1.ĪPP_Tasks function in app.c is as follows, There are two problems (#1 and #2 see below) in USB console debug system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |