Custom Board using nrf52833 , test on deep sleep mode / Low Power mode and RTT mode issues

Hello Engineer 
Greeting of the day 


i am building my product using nrf52833 IC , there are some communication modules connected to the 52833 , i want to cheack lowest power consuption in the board during deep sleep mode , which can be woken up by interupt . 

Steps and clarification i need help on -:

1) i made all gpio pins as output active and LOW using GUI of devicetree .So that no modules can be powered by the 52833 , i am also aware , if there is no code in IC the pins will be floating .
 but for double sure i did that .
  Question : When we make all pins low in devicetree using GUI , will this help ? like after flashing all pins low . Im SUPERNEW new to devicetree and overlay concept and vscode  .i been using nrf repository in my earlier nordic product 

Also i would like mention that even if there in no code in my IC , the communication modules switches on , which means i have to switch them off using the software in my IC .


2) i am checking lowest current consumption on my custom board by placing ammeter in between battery and my board , in series , hope this method is fine , all usb and debugging connecters removed . please let me know if its correct way 

3) system_off example in zephyr rtos nrf 2.6.0 sdk works well on my 52833 DK , but not on my custom board . the current i get is 15mA range , which is very high for my nordic product in future . 

4) MOST IMPORTANT 
why i have to switch to RTT mode after flashing process to see changes to take place in board , eg : i flashed a code to turn of led in my board , but after flashing it doesnt turns off , rather i need to switch on RTT window then only the LED swtiches off , why?

my environment is vs code 
sdk 2.6.1

I'm using JTAG+SWD connector with ground pin , reset , swclk, swdio ,3.3v , only these pins used , in my earlier product i used to flash using external programming pins from my DK and never faced this RTT issue , it was so smooth . please help 



Parents
  • Hi,

    i made all gpio pins as output active and LOW using GUI of devicetree .So that no modules can be powered by the 52833 , i am also aware , if there is no code in IC the pins will be floating .
     but for double sure i did that .
      Question : When we make all pins low in devicetree using GUI , will this help ? like after flashing all pins low . Im SUPERNEW new to devicetree and overlay concept and vscode  .i been using nrf repository in my earlier nordic product 

    For lowest possible power consumption, GPIOs should be put back to their default state which is: Input, Input buffer disconnected, No Pull, Standard Drive, Sense Disconnected.

    2) i am checking lowest current consumption on my custom board by placing ammeter in between battery and my board , in series , hope this method is fine , all usb and debugging connecters removed . please let me know if its correct way 

    It depends on what else is on your board. As that it will measure the current draw of the whole board. 

    3) system_off example in zephyr rtos nrf 2.6.0 sdk works well on my 52833 DK , but not on my custom board . the current i get is 15mA range , which is very high for my nordic product in future . 

    This indicates that something else than the nRF52833 is consuming the current. 

    4) MOST IMPORTANT 
    why i have to switch to RTT mode after flashing process to see changes to take place in board , eg : i flashed a code to turn of led in my board , but after flashing it doesnt turns off , rather i need to switch on RTT window then only the LED swtiches off , why?

    This doesn't quite make sense. Maybe you need to power cycle or reset board manually after flashing the board.

    regards

    Jared 

  • i have one pin that controls the modules on my board i need to set it as logical 0 , so rest all pins i will make it according to your instructions as per point 1.

    P1.Hope this is correct way to test ?

    Also i am using sys_poweroff() command, i hope this is right command for deep sleep mode . and i use this command after clearing my pin for this module for logic 0 so the modules dont turn on . 

    I use following code to test my scenario 

    static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
    static const struct gpio_dt_spec led_1 = GPIO_DT_SPEC_GET(LED1_NODE, gpios);
    
    
    int main(void)
    {
    	int ret;
    	bool led_state = true;
    
    	if (!gpio_is_ready_dt(&led)) {
    		return 0;
    	}
    
    	if (!gpio_is_ready_dt(&led_1)) {
    		return 0;
    	}
    
    	ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
    	if (ret < 0) {
    		return 0;
    	}
    	ret = gpio_pin_configure_dt(&led_1, GPIO_OUTPUT_ACTIVE);
    	if (ret < 0) {
    		return 0;
    	}
    
    	gpio_pin_set_dt(&led,1); //turns off the pin in board where i can manualy test using multimeter 
    	gpio_pin_set_dt(&led_1,1); //turns off modules in my custom board
    
    	sys_poweroff(); // a command for deep sleep mode according to my research 
    
    	while (1) {
    	
    	}
    	return 0;
    }

    Test setup 

    using JTAG device to flash my code, and then go to RTT mode to see the changes (power cycle), mean while there is ammeter connected between the battery wires that powers the board. 

    P2 - Hope this is correct code commands and way to test??, offcourse after implementing step 1 from your response.

    Last, as you know i am reading current in ammeter in battery power supply, i have noticed strange behavior , that when jtag is connected to board and ammeter at battery side, when i remove jtag after flashing above code, i see huge surge in current in my ammeter, like it goes from (13-14)mA to 20mA

    P3 - this is crucial part, why this is happening? 

    please answer P1, P2 & P3 after reading, i might be very naive with my research, apologies for that, this will help to create features of our product and start pre-production steps. 

    Thanks  




  • Hi,

    Sankton said:
    i have one pin that controls the modules on my board i need to set it as logical 0 , so rest all pins i will make it according to your instructions as per point 1.

    P1.Hope this is correct way to test ?

    It depends on what is connected to that pin. Could you share a schematic of your board?

    Sankton said:

    Test setup 

    using JTAG device to flash my code, and then go to RTT mode to see the changes (power cycle), mean while there is ammeter connected between the battery wires that powers the board. 

    P2 - Hope this is correct code commands and way to test??, offcourse after implementing step 1 from your response.

    If the debugger is connected to the board then the chip will not enter sleep mode since the debugger interface will be activated. The chip will only emulate system off sleep but doesn't truly go to sleep. When you measure the current you have to make sure that the debugger is not connected, and that the device has been power cycled for it to exit debug mode. Using sys_poweroff() is ok but make sure that CONFIG_POWEROFF has been enabled.

    Sankton said:

    Last, as you know i am reading current in ammeter in battery power supply, i have noticed strange behavior , that when jtag is connected to board and ammeter at battery side, when i remove jtag after flashing above code, i see huge surge in current in my ammeter, like it goes from (13-14)mA to 20mA

    P3 - this is crucial part, why this is happening? 

    20 mA is far from the expected current of the device unless it's constant in TX mode. So something is not right with your measurement setup. I think you need to provide a schematic of your design and specify exactly where you measure, also I highly recommend getting a PPK2 so that you could see the current plot, that would tell us a lot more of what you're measuring,

    regards

    Jared 

Reply
  • Hi,

    Sankton said:
    i have one pin that controls the modules on my board i need to set it as logical 0 , so rest all pins i will make it according to your instructions as per point 1.

    P1.Hope this is correct way to test ?

    It depends on what is connected to that pin. Could you share a schematic of your board?

    Sankton said:

    Test setup 

    using JTAG device to flash my code, and then go to RTT mode to see the changes (power cycle), mean while there is ammeter connected between the battery wires that powers the board. 

    P2 - Hope this is correct code commands and way to test??, offcourse after implementing step 1 from your response.

    If the debugger is connected to the board then the chip will not enter sleep mode since the debugger interface will be activated. The chip will only emulate system off sleep but doesn't truly go to sleep. When you measure the current you have to make sure that the debugger is not connected, and that the device has been power cycled for it to exit debug mode. Using sys_poweroff() is ok but make sure that CONFIG_POWEROFF has been enabled.

    Sankton said:

    Last, as you know i am reading current in ammeter in battery power supply, i have noticed strange behavior , that when jtag is connected to board and ammeter at battery side, when i remove jtag after flashing above code, i see huge surge in current in my ammeter, like it goes from (13-14)mA to 20mA

    P3 - this is crucial part, why this is happening? 

    20 mA is far from the expected current of the device unless it's constant in TX mode. So something is not right with your measurement setup. I think you need to provide a schematic of your design and specify exactly where you measure, also I highly recommend getting a PPK2 so that you could see the current plot, that would tell us a lot more of what you're measuring,

    regards

    Jared 

Children
No Data
Related