<?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>UART CLOSED AND OPEN (nrf52832 with sdk12.1.0)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25818/uart-closed-and-open-nrf52832-with-sdk12-1-0</link><description>we need to open uart 30s and close it 30s.there is our code: 
 if(sec_cnt==30)
{
	//printf(&amp;quot;sec_cnt=30 is now\r\n&amp;quot;);//zzq
	nrf_delay_ms(100);
	nrf_drv_uart_uninit(&amp;amp;m_dtm_uart_driver);
}

if(sec_cnt==60)
{
	sec_cnt=0;
	uart_init();
}
 
 but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 28 Oct 2017 11:09:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25818/uart-closed-and-open-nrf52832-with-sdk12-1-0" /><item><title>RE: UART CLOSED AND OPEN (nrf52832 with sdk12.1.0)</title><link>https://devzone.nordicsemi.com/thread/101709?ContentTypeID=1</link><pubDate>Sat, 28 Oct 2017 11:09:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1359166-24e9-4db5-b6f9-96f9e34b940c</guid><dc:creator>jenkey.zhu</dc:creator><description>&lt;p&gt;how to debug?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART CLOSED AND OPEN (nrf52832 with sdk12.1.0)</title><link>https://devzone.nordicsemi.com/thread/101715?ContentTypeID=1</link><pubDate>Mon, 16 Oct 2017 14:34:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4784b5d1-1447-465e-aa3c-778877a9ab9c</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Have you debugged?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART CLOSED AND OPEN (nrf52832 with sdk12.1.0)</title><link>https://devzone.nordicsemi.com/thread/101714?ContentTypeID=1</link><pubDate>Sat, 14 Oct 2017 13:49:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:614cadbb-c38f-4355-9d79-0d72f9e21dc4</guid><dc:creator>jenkey.zhu</dc:creator><description>&lt;p&gt;when sec_cnt==30,the system halted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART CLOSED AND OPEN (nrf52832 with sdk12.1.0)</title><link>https://devzone.nordicsemi.com/thread/101713?ContentTypeID=1</link><pubDate>Sat, 14 Oct 2017 13:45:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e601c79-7d72-4586-99d1-50a4fc726d7f</guid><dc:creator>jenkey.zhu</dc:creator><description>&lt;p&gt;int main(void)
{
uint32_t err_code;
uint32_t rct1_cnt;
bool erase_bonds;
OLDDATA_SYNC_FLAG=0;
gpio_init();	
uart_init();
saadc_init();&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	timers_init();//zzq
	Int_Timer();	
	//buttons_leds_init(&amp;amp;erase_bonds);
	ble_stack_init();
	gap_params_init();
	services_init();
	advertising_init();
	conn_params_init();
	application_timers_start();
	
	
  printf(&amp;quot;\r\nUART Start!\r\n&amp;quot;);//zzq
	
	err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
	APP_ERROR_CHECK(err_code);
	// Enter main loop.
	nrf_delay_ms(3000);
	for (;;)
	{
				
					//nrf_delay_ms(10);       //waiting a second		

					if(g_secondcnt_detected ==true)
					{
					g_60seconds_cnt++;
					g_90seconds_cnt++;	
					sec_cnt++;					
					g_secondcnt_detected=false;										
					}

					if(OLDDATA_SYNC_FLAG==1)
					{
					      read_flash_data(&amp;amp;g_bcg_startDate,&amp;amp;g_bcg_stopDate);
					}
					else
					{	
					   					
						if((sec_cnt%2)==0)
						{						
						nrf_gpio_pin_toggle(LED_GREEN);
						nrf_gpio_pin_toggle(LED_RED);
						}
						else if(sec_cnt==30)
						{
						nrf_drv_uart_uninit(&amp;amp;m_dtm_uart_driver);
						}
						else if(sec_cnt==60)
						{
						sec_cnt=0;
						uart_init();
						}

					}

				   send_data();
				 if((OLDDATA_SYNC_FLAG==0)&amp;amp;&amp;amp;(g_90seconds_cnt&amp;gt;10))
					{
					send_heart();	 
        g_90seconds_cnt=0; 
					}
	      //  power_manage();
	}
	
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART CLOSED AND OPEN (nrf52832 with sdk12.1.0)</title><link>https://devzone.nordicsemi.com/thread/101712?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 06:46:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8238a455-1224-4bd7-9f30-941e1e480eee</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Have you &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;debugged&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;I think you need to upload more of your code. This doesn&amp;#39;t really show us much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART CLOSED AND OPEN (nrf52832 with sdk12.1.0)</title><link>https://devzone.nordicsemi.com/thread/101710?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 13:09:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aecad343-90b6-47eb-ae62-bac93724305d</guid><dc:creator>jenkey.zhu</dc:creator><description>&lt;p&gt;yes ,it can not restart. it can not receive anything.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART CLOSED AND OPEN (nrf52832 with sdk12.1.0)</title><link>https://devzone.nordicsemi.com/thread/101711?ContentTypeID=1</link><pubDate>Tue, 10 Oct 2017 11:09:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a392991-248f-4dab-a686-059c346e5a23</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;What do you mean it can not start? How do you know? Have you debugged your code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>