<?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>integration usbd acd acm with DFU mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76633/integration-usbd-acd-acm-with-dfu-mesh</link><description>Hi, 
 
 I want to add DFU over mesh and usbd into the client example. 
 I have faced an error of Multiple definitions of UARTE0_UART0_IRQHandler. I comment out the UARTE0_UART0_IRQHandler in the ses_startup. I tried to use UARTE1 for usbd by enabling</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Aug 2021 13:15:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76633/integration-usbd-acd-acm-with-dfu-mesh" /><item><title>RE: integration usbd acd acm with DFU mesh</title><link>https://devzone.nordicsemi.com/thread/323774?ContentTypeID=1</link><pubDate>Fri, 06 Aug 2021 13:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef348595-3e16-4bda-941c-606b1c0f1371</guid><dc:creator>Kaja</dc:creator><description>&lt;p&gt;Hi Sama,&lt;br /&gt;&lt;br /&gt;this question has gone unanswered.. have you solved your problem? If not, could you create a new ticket?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Kaja&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: integration usbd acd acm with DFU mesh</title><link>https://devzone.nordicsemi.com/thread/318885?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2021 06:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:510f21b4-c194-41d9-8295-c8f782083656</guid><dc:creator>Sama</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have been waiting for a long time without any response.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I managed to add USBD CDC ACM to the client example including DFU over serial, and I can send and receive data via USB port.&lt;/p&gt;
&lt;p&gt;Now, all I want to do is send the data from the serial terminal on the detected USB PORT and then publish it over the mesh.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I have a function named &amp;quot;send message&amp;quot; as below, called when data received from the USB port.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void send_message (void) 
{
    uint32_t status=0;
    char buffer[8];///={0x44,0x61,0x74,0x61};
    uint8_t length;
    uint16_t address;
    access_message_tx_t msg;
    length= sizeof(buffer);
               if (length)
                { 
                  msg.opcode.opcode = simple_message_OPCODE_SEND ;
                  msg.opcode.company_id = 0x0059; // Nordic&amp;#39;s company ID
      
                  msg.p_buffer = (const uint8_t *) &amp;amp;buffer[0];
                  msg.length =length;
            
                  

                  //SEGGER_RTT_printf(0,&amp;quot;Sending to group address 0x%04x\n&amp;quot;, address);
                  status= access_model_publish(m_clients[0].model_handle, &amp;amp;msg);        //CHANGED TO 0 FROM 3 
                  __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Status : %u \n&amp;quot;, status);

                  if (status == NRF_ERROR_INVALID_STATE ||
                  status == NRF_ERROR_BUSY||status == NRF_ERROR_NO_MEM)
                   {
                     __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Cannot send. Device is busy.\n&amp;quot;);
                      hal_led_blink_ms(LEDS_MASK, 50, 4);
                   }
                   else
                   {
                         ERROR_CHECK(status);
                   }
                }

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I get the error when I send data:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;app_error_weak.c, 105, Mesh assert at 0x0002CDF8 (:0)&lt;br /&gt;which I got with adding UART into client example, and I asked in this ticket.&lt;/p&gt;
&lt;p&gt;I have used the addr2line tool and it returned:&lt;/p&gt;
&lt;p&gt;....\mesh\core\src/timer_scheduler.c:218 (discriminator 1).&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I have searched the Devzone, and I found out this is related to the priority level. As far as I understood, when I call a mesh API from a handler, it is needed to initialize the mesh with &amp;quot;NRF_MESH_IRQ_PRIORITY_LOWEST&amp;quot; and use the same priority level for the user interrupt (cdc_acm_user_ev_handler in this situation).&lt;/p&gt;
&lt;p&gt;Here is the mesh init function:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void mesh_init(void)
{
mesh_stack_init_params_t init_params =
{
.core.irq_priority = NRF_MESH_IRQ_PRIORITY_LOWEST,
.core.lfclksrc = DEV_BOARD_LF_CLK_CFG,
.core.p_uuid = NULL,
.models.models_init_cb = models_init_cb,
.models.config_server_cb = config_server_evt_cb
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and here is the priority setting of USBD:&lt;/p&gt;
&lt;p&gt;#ifndef NRFX_USBD_CONFIG_IRQ_PRIORITY&lt;br /&gt;#define NRFX_USBD_CONFIG_IRQ_PRIORITY 6&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;#ifndef USBD_CONFIG_IRQ_PRIORITY&lt;br /&gt;#define USBD_CONFIG_IRQ_PRIORITY 6&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Any solution?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please let me know if I should create a new ticket.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Br,&lt;br /&gt;Sama&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: integration usbd acd acm with DFU mesh</title><link>https://devzone.nordicsemi.com/thread/317449?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 11:27:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa863334-0596-49c4-a990-058480db4cc1</guid><dc:creator>Sama</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there any solution?&lt;/p&gt;
&lt;p&gt;I look forward to hearing from you.&lt;/p&gt;
&lt;p&gt;Br,&lt;/p&gt;
&lt;p&gt;Sama&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>