<?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>Data after callback ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71232/data-after-callback</link><description>Dear Members, 
 How can i keep the data no being cut ? 
 before using call back function , 
 
 after using call back function : 
 
 
 function : 
 call back from main : 
 
 
 Call back and process function : 
 
 
 What do I miss here ? a size of data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Feb 2021 16:29:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71232/data-after-callback" /><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/293404?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 16:29:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a93097e1-6344-45b6-8df6-167885ccccdc</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>[quote user="RixtronixLAB"]Is my call back function taking too much time ? thanks[/quote]
&lt;p&gt;That is possible. You could try to move the processing outside of the lbUARTE event handler, by setting a flag in the handler and do the processing in main-loop. The processing inside the handler which runs in interrupt context will prevent other events with same/lower priority from being handled. This may cause issues in some cases.&lt;/p&gt;
&lt;p&gt;It may also be easier to help you out if you post the full code. It is not easy to see exactly what happens in the application from the small code snippets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/292972?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 15:49:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a703b11a-0b66-4c12-bbd1-30c13d7da8c2</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Hi Jorgen, any clues ? let me know any other inputs you need ?&lt;/p&gt;
&lt;p&gt;Is my call back function taking too much time ? thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/292878?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 11:28:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e332f93-199e-4253-beaa-825f024cc106</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Is it related with interrupt priority ?&lt;/p&gt;
&lt;p&gt;I need to put GPS UART higher priority ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;pre class="ui-code" data-mode="text"&gt; nrf_libuarte_async_config_t nrf_libuarte_async_config = {
            .tx_pin     = TX_PIN_NUMBER,
            .rx_pin     = RX_PIN_NUMBER,
            .baudrate   = NRF_UARTE_BAUDRATE_115200,
            .parity     = NRF_UARTE_PARITY_EXCLUDED,
            .hwfc       = NRF_UARTE_HWFC_DISABLED,
            .timeout_us = 1000,
            .int_prio   = APP_IRQ_PRIORITY_LOW
    };
		
		nrf_libuarte_async_config_t nrf_libuarte_async_config1 = {
            .tx_pin     = SER_APP_TX_PIN,
            .rx_pin     = SER_APP_RX_PIN,
            .baudrate   = NRF_UARTE_BAUDRATE_9600,
            .parity     = NRF_UARTE_PARITY_EXCLUDED,
            .hwfc       = NRF_UARTE_HWFC_DISABLED,
            .timeout_us = 1000,
            .int_prio   = APP_IRQ_PRIORITY_LOW
    };&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/292797?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 04:55:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e37b6909-a165-46ce-b2e2-863e632aada2</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Yes I had init systick&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{
    bsp_board_init(BSP_INIT_LEDS);
    
    ret_code_t ret = nrf_drv_clock_init();
    APP_ERROR_CHECK(ret);
  
    nrf_drv_clock_lfclk_request(NULL);

    //ret_code_t err_code = NRF_LOG_INIT(app_timer_cnt_get);
	  ret_code_t err_code = NRF_LOG_INIT(NULL);
    APP_ERROR_CHECK(err_code);
	
	  /* Init systick driver */
    nrf_drv_systick_init();&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/292728?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 14:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:378c5f53-0902-4ac6-9e61-32d3a42b08a9</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Code&amp;nbsp; &lt;pre class="ui-code" data-mode="text"&gt; case NRF_LIBUARTE_ASYNC_EVT_RX_DATA:
					   //nrf_libuarte_async_tx(&amp;amp;libuarte, text2, text_size2);
				    nrf_libuarte_async_tx(&amp;amp;libuarte, p_evt-&amp;gt;data.rxtx.p_data, p_evt-&amp;gt;data.rxtx.length);
				    
				    //GPS_CallBack();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;output :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2021_2D00_02_2D00_03-22_5F00_58_5F00_03_2D00_Output-without-GPS_5F00_callback.png" /&gt;&lt;/p&gt;
&lt;p&gt;code :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;case NRF_LIBUARTE_ASYNC_EVT_RX_DATA:
					   //nrf_libuarte_async_tx(&amp;amp;libuarte, text2, text_size2);
				    //nrf_libuarte_async_tx(&amp;amp;libuarte, p_evt-&amp;gt;data.rxtx.p_data, p_evt-&amp;gt;data.rxtx.length);
				    
				    GPS_CallBack();
				    

typedef struct 
{
	uint8_t		rxBuffer[1024];
	uint16_t	rxIndex;
	uint8_t		rxTmp;	
	uint32_t	LastTime;	
	
	GPGGA_t		GPGGA;
	
}GPS_t;				    
				    
void	GPS_CallBack(void)
{
	
	
	GPS.LastTime=nrf_systick_val_get();
	
	
	
	
	if(GPS.rxIndex &amp;lt; sizeof(GPS.rxBuffer)-2)
	{
	
		GPS.rxBuffer[GPS.rxIndex] = GPS.rxTmp; 
		GPS.rxIndex++;
		memcpy((void *)line_buffer_GPS, GPS.rxBuffer, GPS.rxIndex); 
	}
   nrf_libuarte_async_rx_free(&amp;amp;libuarte1, (uint8_t *)&amp;amp;GPS.rxTmp, 1);
	 
	
	//DEBUG display on terminal :
	
	nrf_libuarte_async_tx(&amp;amp;libuarte, GPS.rxBuffer, sizeof(GPS.rxBuffer));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Output :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2021_2D00_02_2D00_03-23_5F00_01_5F00_51_2D00_After-using-GPS_5F00_Callback.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/292723?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 14:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bc0a618-40d6-4ab7-907e-74c975b06339</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;it&amp;#39;s data in the buffer, it&amp;#39;s cut when I use GPS_Callback() function ? and buffer is gone when I use GPS_process&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/292714?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 14:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c8c5597-7d82-4a66-b8b7-202e2b39e4fe</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Not sure I understand what you are asking. What are we looking at in the images? Is it the data in the buffer(s)? Output from UART? Something else?&lt;/p&gt;
[quote user="RixtronixLAB"]How to get systick ?[/quote]
&lt;p&gt;There is a&amp;nbsp;&lt;a title="Blinky SysTick Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/systick_example.html?cp=7_5_0_4_6_3"&gt;Blinky SysTick Example&lt;/a&gt;&amp;nbsp;in the SDK, however this does not use the&amp;nbsp;&lt;span&gt;nrfx_systick_get() function. Did you init systick first?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/292583?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 00:02:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:561c8026-391f-4f0e-ac10-920c8ac40628</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;How to get systick ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;void nrfx_systick_get(nrfx_systick_state_t * p_state)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; p_state-&amp;gt;time = nrf_systick_val_get();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;any examples using that function ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data after callback ?</title><link>https://devzone.nordicsemi.com/thread/292519?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 15:00:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abd47218-3bd9-44aa-a1e8-c1c4fa94b6a8</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;And GPS.Lasttime = 0x00000, looks like&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;GPS.LastTime=nrf_systick_val_get();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2021_2D00_02_2D00_02-23_5F00_08_5F00_20_2D00_G_5F005F00_nRF5_5F00_SDK_5F00_17.0.2_5F00_d674dde_5F00_examples_5F00_peripheral_5F00_libuarte_5F00_pca10056_5F00_blank_5F00_arm5_5F00_no_5F00_p.png" /&gt;&lt;/p&gt;
&lt;p&gt;not giving a result ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>