<?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>nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54783/nrf52810-uart-rx-issue</link><description>Hi team, I faced the following problem: there is a custom board with nRF52810 on it, UART is used on this board. 
 I set up Debug configuration and UART is working OK, but when I switched to Release config UART is not working properly (there is no UART</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Nov 2019 08:54:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54783/nrf52810-uart-rx-issue" /><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/222543?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 08:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96c72521-bc3e-4eff-b61a-4eb7052ef230</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vasa&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry, but I&amp;#39;m not able to see what&amp;#39;s wrong just looking at your functions like this. What does the uartStartRX(); function do different than nrf_drv_uart_rx();? You should be able to see an error message of some kind while debugging. What happens if you put uartStartRX(); in uart_init instead of nrf_drv_uart_rx?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/222294?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 10:25:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b34e1386-6c7e-41b6-9e68-d57b90ec2570</guid><dc:creator>Vasa</dc:creator><description>&lt;p&gt;Hi, on the first snippet the line before last if() and on the second snippet the function uartStartRx(). Inside this function&amp;nbsp;&lt;span&gt;uartStartRx() there is another call of&amp;nbsp;nrf_drv_uart_rx(). As a relult this works, but it wierd.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/222287?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 10:15:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38d4f3e3-59eb-4a10-b5e8-530a6e6b3277</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not able to see where the&amp;nbsp;&lt;span&gt;nrf_drv_uart_rx function is called within your uart_init function. Can you please try to clarify?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/222167?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 16:27:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2290f143-549a-4551-8754-c4078d55addb</guid><dc:creator>Vasa</dc:creator><description>&lt;p&gt;I used SDK15.3&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcu_status_t application_init(){
m_system.bF.gpio_state = mcu_gpio_init(kGpioPortA, kGpioPin12, kGpioPin14);
mcu_set_boot_mode();
mcu_reset();

nrf_delay_ms(50);
m_system.bF.uart_state = uart_init(UART0, kPortA, kPin5, kPortA, kPin4, DISABLE, INCLUDE, BAUD_115200);
nrf_delay_ms(50);
uartStartRx();

m_system.bF.protocol_state = mcu_protocol_init();

m_system.bF.gpio_state = 0;

#ifdef DEBUG_LOG
PRINTF(TEXT_CYAN_BOLD &amp;quot;Application started...&amp;quot; TEXT_DEFAULT &amp;quot;\r\n&amp;quot;);
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I wrapped&amp;nbsp;&lt;span&gt;nrf_drv_uart_rx() function&amp;nbsp;&lt;/span&gt;into&amp;nbsp;&lt;span&gt;uartStartRx() (located after nrf_delay_ms(50);)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/222105?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 13:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15fc9fbd-4b61-4b9e-897f-d0d1756d701e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you show me a snippet of your code showing me your uart_init(); and where you put the nrf_drv_uart_rx(); call outside of uart_init();? Also, what SDK version are you using?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/221996?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 07:43:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7208a5c0-bd94-4d0c-a30f-c40611f6b6cc</guid><dc:creator>Vasa</dc:creator><description>&lt;p&gt;Thanks for information, but i&amp;#39;ve already made all the necessary changes. The only thing that helped me is the second call of this function&amp;nbsp;&lt;span&gt;nrf_drv_uart_rx(&amp;amp;m_uart, m_rx_buffer, 1), so the first call I mde inside&amp;nbsp;uart_init() function (as usual) and the second call I made outside&amp;nbsp;uart_init() function. And this is works, but I can&amp;#39;t explane why. Any ideas?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/221876?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 14:02:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca8dd514-940d-4e71-9757-3d22999e2522</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;In order for a project to work on an nRF52810, please follow the steps described in&amp;nbsp;&lt;strong&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fnrf52810_user_guide.html&amp;amp;anchor=ug_52810_project"&gt;Transferring the project to nRF52810 hardware&lt;/a&gt;&lt;/strong&gt; on the Infocenter. Keep in mind that you have to remove the nRF52840 defnes and startup/system files from the project if the project is a 52840 project by default.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/221822?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 11:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:623c662d-940c-4d81-bf1e-645f0a62bcb9</guid><dc:creator>Vasa</dc:creator><description>&lt;p&gt;The biggest misunderstanding for me is that the similar code works fine on nRF52840. I just port the same code from nRF52840 to nRF52810. It seems to me that there is should not be difference between UART init function for 840 and 810.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/221819?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 11:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bfd3034-429f-4422-a296-3511241f34e2</guid><dc:creator>Vasa</dc:creator><description>&lt;p&gt;Hi, here is my inti function for UART&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint8_t m_tx_buffer[1] = { 0 };
static uint8_t m_rx_buffer[1] = { 0 };

uart_status_t uart_init(uart_t uart, port_t portTx, pin_t pinTx, port_t portRx, pin_t pinRx, hwfc_t flow, parity_t parity, baud_rate_t baud){
//static nrf_drv_uart_t l_uart = NRF_DRV_UART_INSTANCE(0);
//memcpy(&amp;amp;m_uart, &amp;amp;l_uart, sizeof(m_uart));

nrf_drv_uart_config_t l_uart_cfg = NRF_DRV_UART_DEFAULT_CONFIG;
uint32_t l_pin_rx_map = NRF_UART_PSEL_DISCONNECTED;
uint32_t l_pin_tx_map = NRF_UART_PSEL_DISCONNECTED;
uint32_t l_pin_cts_map = NRF_UART_PSEL_DISCONNECTED;
uint32_t l_pin_rts_map = NRF_UART_PSEL_DISCONNECTED;
nrf_uart_hwfc_t l_flow = NRF_UART_HWFC_DISABLED;
nrf_uart_parity_t l_parity = NRF_UART_PARITY_EXCLUDED;
nrf_uart_baudrate_t l_baud = NRF_UART_BAUDRATE_115200;

l_pin_tx_map = NRF_GPIO_PIN_MAP(portTx, pinTx);
l_pin_rx_map = NRF_GPIO_PIN_MAP(portRx, pinRx);

if(flow == ENABLE){
l_flow = NRF_UART_HWFC_ENABLED;
}

if(parity == INCLUDE){
l_parity = NRF_UART_PARITY_INCLUDED;
}

switch(baud){
case BAUD_1200:
l_baud = NRF_UART_BAUDRATE_1200;
break;
case BAUD_2400:
l_baud = NRF_UART_BAUDRATE_2400;
break;
case BAUD_4800:
l_baud = NRF_UART_BAUDRATE_4800;
break;
case BAUD_9600:
l_baud = NRF_UART_BAUDRATE_9600;
break;
case BAUD_19200:
l_baud = NRF_UART_BAUDRATE_19200;
break;
case BAUD_38400:
l_baud = NRF_UART_BAUDRATE_38400;
break;
case BAUD_57600:
l_baud = NRF_UART_BAUDRATE_57600;
break;
case BAUD_115200:
l_baud = NRF_UART_BAUDRATE_115200;
break;
}

l_uart_cfg.interrupt_priority = UART_DEFAULT_CONFIG_IRQ_PRIORITY;
l_uart_cfg.use_easy_dma = true;

l_uart_cfg.pseltxd = l_pin_tx_map;
l_uart_cfg.pselrxd = l_pin_rx_map;
l_uart_cfg.hwfc = l_flow;
l_uart_cfg.parity = NRF_UART_PARITY_INCLUDED;
l_uart_cfg.baudrate = l_baud;

nrf_drv_uart_init(&amp;amp;m_uart, &amp;amp;l_uart_cfg, uart_handler);

fifo_init(&amp;amp;m_fifo, FIFO_SIZE);
ring_init(&amp;amp;m_ring, RING_SIZE);

m_uart_init_state = true;


ret = nrf_drv_uart_rx(&amp;amp;m_uart, m_rx_buffer, 1);

if(ret != NRF_SUCCESS){
ERROR_HANDLER();
}
return UART_OK;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52810 uart RX issue</title><link>https://devzone.nordicsemi.com/thread/221805?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2019 10:20:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0443cfd-7439-4956-85a5-c43db3d7d705</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What have you set the UART RX buffer length as in your application? Keep in mind that the size of UART buffers needs to be in a power of 2. Can you upload a snippet of your uart_init(); function so I can have a better look at what&amp;#39;s going on here?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>