<?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>Always high current consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41666/always-high-current-consumption</link><description>Hi!! 
 I am measuring the current consumption of nRF 52832. 
 However, it shows a very high average consumption current value of 9 mA at all times. 
 I think that it is probably not caused by not putting it to sleep state. 
 I&amp;#39;d like to wake up from sleep</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Dec 2018 14:17:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41666/always-high-current-consumption" /><item><title>RE: Always high current consumption</title><link>https://devzone.nordicsemi.com/thread/162684?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 14:17:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:612524c5-9e8b-438e-a9b5-4cf2f066cf15</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;Hi!!&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;I decided to send data with a timer.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;I forgot to enable TIMER in sdk_config.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;thank you !!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always high current consumption</title><link>https://devzone.nordicsemi.com/thread/162320?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 14:54:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2b15115-30f5-40e2-8330-08906e4a50f5</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;Hi!!&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;I am using the example of ble_app_uart of SDK 14.0.0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;and i am using nrf52832 DK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;I would like to use a external interrupt of gpio, send data when 30th pin goes to 0, then sleep and 30th pin got 1.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;However,&amp;nbsp; &amp;nbsp;nrf52832 DK became sleep mode, but there is no interrupt.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;Therefore, we can not confirm the transmission of data.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;my code is shown in below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;/span&gt;&lt;span lang="en"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;static void gpio_init(void)
{
	ret_code_t err_code;
	err_code = nrf_drv_gpiote_init();
	APP_ERROR_CHECK(err_code);
	
	nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
  in_config.pull = NRF_GPIO_PIN_PULLUP;
	
	err_code = nrf_drv_gpiote_in_init(30, &amp;amp;in_config, in_pin_handler);
  APP_ERROR_CHECK(err_code);

 nrf_drv_gpiote_in_event_enable(30, true);
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;pre class="ui-code" data-mode="text"&gt;void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
   		static uint8_t       m_tx_buf[1];
		uint16_t length = 16;
		static uint8_t       m_rx_buf[16];
	
		m_tx_buf[0] = 0x00;
		nrf_drv_spi_transfer(&amp;amp;spi, m_tx_buf, 1, NULL, NULL);
		nrf_delay_us(100);
		nrf_drv_spi_transfer(&amp;amp;spi, m_tx_buf, 1, NULL, NULL);
		nrf_delay_us(100);
		nrf_drv_spi_transfer(&amp;amp;spi, m_tx_buf, 1, NULL, NULL);
		nrf_delay_us(100);
		nrf_drv_spi_transfer(&amp;amp;spi, m_tx_buf, 1, m_rx_buf, 2);
		m_rx_buf[buf_count] = *m_rx_buf;
		buf_count++;
		nrf_delay_us(100);
					if(buf_count &amp;gt;= 16){
						ble_nus_string_send(&amp;amp;m_nus, m_rx_buf, &amp;amp;length);
					
						for(int i = 0;i&amp;gt;buf_count;i++){
							m_rx_buf[i] = 0;
						}
						buf_count = 0;				
					}
		nrf_delay_us(100);
		nrf_drv_spi_transfer(&amp;amp;spi, m_tx_buf, 1, NULL, NULL);
		nrf_delay_us(100);
}&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{        
    uart_init();    
    log_init();    
    ble_stack_init();
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();
    err_code = ble_advertising_start(&amp;amp;m_advertising, BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);
    gpio_init();
	spi_init();
	InitADS119x();
	nrf_delay_us(200);			//4tclock
	SPITxCommand(0x11);
	nrf_delay_us(200);  
	ADS1x9x_Reg_Init();		//ads register initialization
	ADS119x_Enable_start();
	SPITxCommand(0x1a);  //Channel Offset Calibration
	SPITxCommand(0x10);  //0x10 = RDATAC(Read Data Command)(Enable Read Data Continuous mode)
	nrf_delay_us(8);

	sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE); //DC-DC mode enabled
	//	sd_ble_gap_tx_power_set(0); 									 //Tx power 0dBm
    // Enter main loop.
		
    for (;;)
    {
        power_manage();
	}
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;If you find a mistake in this code, please let me know.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;best regards!!!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always high current consumption</title><link>https://devzone.nordicsemi.com/thread/162145?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2018 16:40:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0ba61c8-e420-4499-aa33-866aae19773c</guid><dc:creator>Kaito</dc:creator><description>&lt;p&gt;thank you for your reply!&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;It seems that I was not in sleep mode.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;If you add the system off mode at the end of the main sentence, it will not start from sleep and data transmission will not be possible.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;I&amp;#39;d like to wake up the nrf 52832 from sleep as a trigger a certain pin and want to go to sleep when data transmission is over.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;in that case,how should i modify my code?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;best regards!!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always high current consumption</title><link>https://devzone.nordicsemi.com/thread/162130?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2018 15:29:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da3da874-e11c-4b5f-918d-53072f5aff75</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Constant current consumption of 9 mA is very high.&lt;/p&gt;
&lt;p&gt;Are you measuring in our nRF52 DK or in a custom board? Do you use the PPK to measure or another tool? Could you test the current consumption when you run the ble_app_hrs example from the SDK to see if the board is working as it should? (The power consumption of ble_app_hrs example should be in the range of &amp;lt;100uA).&lt;/p&gt;
&lt;p&gt;You can also put the MCU to system off mode with the following code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void){
    NRF_POWER-&amp;gt;SYSTEMOFF = 1;
    for(;;){}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Check the current consumption then, it should be ~1uA.&lt;/p&gt;
&lt;p&gt;PS. Always power-reset the nRF52 after flashing the firmware and before measuring current, so you are sure you are not in debugger mode. Debugger mode will draw a lot of current.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>