<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NRF52840, gzll combine with USBD HID and USBD CLI, COM port no output</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113300/nrf52840-gzll-combine-with-usbd-hid-and-usbd-cli-com-port-no-output</link><description>Good day, 
 I am trying to combine gzll, USBD HID and USBD CLI with SDK 17.1.0 and nrf 52840. GZLL receiving input, send to USBD HID, USBD CLI output logs and debugs. 
 Below is part of codes. 
 USBD_CLI_CDC_CAM.C 
 
 USBD_HID_SERVICE.C 
 
 MAIN.C 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Jul 2024 09:28:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113300/nrf52840-gzll-combine-with-usbd-hid-and-usbd-cli-com-port-no-output" /><item><title>RE: NRF52840, gzll combine with USBD HID and USBD CLI, COM port no output</title><link>https://devzone.nordicsemi.com/thread/496164?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2024 09:28:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8272ce04-a94a-489d-b1ce-f18f8f34dca9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Awesome, thanks for letting us know. Marked your answer as Verified.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840, gzll combine with USBD HID and USBD CLI, COM port no output</title><link>https://devzone.nordicsemi.com/thread/496106?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2024 01:31:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf120b65-5d5a-4e9e-95ce-8aacf688b591</guid><dc:creator>buglovebug</dc:creator><description>&lt;p&gt;hi,Susheel&lt;/p&gt;
&lt;p&gt;I figured out the problem, after looking though solution of other posts with similar problem, the reason is cli_process&amp;nbsp; runned not enough frequently, and when Gazell host service running, the logs blocked the queue, once disconnected usb, cli_rtt suddenly flushed.&lt;/p&gt;
&lt;p&gt;My solution as below:&lt;/p&gt;
&lt;p&gt;1. close NRF_CLI_USES_TASK_MANAGER_ENABLED in sdk_config.h&lt;/p&gt;
&lt;p&gt;2. delete all nrf_cli_task_create() - think take manager having some problem with cli process.&lt;/p&gt;
&lt;p&gt;3. add below to USBD_CLI_CDC_CAM.C&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void cli_process(void)
{
    nrf_cli_process(&amp;amp;m_cli_cdc_acm);

    nrf_cli_process(&amp;amp;m_cli_rtt);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;4. ammend&amp;nbsp; void start_gzll_tx_statistics(void *p_context) as below in GZLL_HOST_SERVICE.C&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void start_gzll_tx_statistics(void *p_context) {
    UNUSED_PARAMETER(p_context);
    while (true)
    {
        cli_process()
        if(output_mod()!=GZLL) task_exit()
        //when stop gzll host service, task exit.
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;5. ammend idle_state_handle() in Main.C&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void idle_state_handle(void * p_context)
{
    UNUSED_PARAMETER(p_context);
    for (;;) {
        //if gzll host service stop, continue run cli_process() frequently.
        if (output_mode() != GZLL) cli_process();
        
        if (NRF_LOG_PROCESS() == false) {
            nrf_pwr_mgmt_run();
        }
        task_yield();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;after the above ammendments, everything run all good,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840, gzll combine with USBD HID and USBD CLI, COM port no output</title><link>https://devzone.nordicsemi.com/thread/496020?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 13:27:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14e996c8-9191-451d-8c46-e911da7d6c6e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am not sure why the COM port and RTT are not working when you start GZLL_HOST_SERVICE. The resources used by Gazell are shown &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.1.0%2Fgzll_02_user_guide.html&amp;amp;cp=9_1_5_4_2&amp;amp;anchor=gzll_resources"&gt;here&lt;/a&gt;&amp;nbsp;and UART is not one among them. I am just guessing that when you start the Gazell host service, then the application is looping somewhere. Could you confirm if this is the case by running your application in the debugger and start the host service and let it run for a while and and pause and see if the application is working as intended apart from the UART/COM port?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840, gzll combine with USBD HID and USBD CLI, COM port no output</title><link>https://devzone.nordicsemi.com/thread/495801?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 11:17:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9278a44-85ff-41fd-9a31-453a590de60b</guid><dc:creator>buglovebug</dc:creator><description>&lt;p&gt;Good day, Noeem,&lt;/p&gt;
&lt;p&gt;thanks a lot fo your attention, looking forward to your reply.&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840, gzll combine with USBD HID and USBD CLI, COM port no output</title><link>https://devzone.nordicsemi.com/thread/495362?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2024 08:44:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80ac6434-3fff-4e63-be08-b5b582716702</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We have received your query and one of Nordic engineer will look into this. It may take few days as are going through the period of heavy load.&lt;/p&gt;
&lt;p&gt;Appreciate your patience.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>