This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Noise from power profiler analysis

I've got several problems but they are all linked more or less with the power profiler.

All devices I have are nRF52840 dk. The code is written with Zephyr but I doubt it plays a big role. For power profiler, we have the power profiler kit.

1st problem : I had one device with which I could use the power profiler correctly. Unfortunately I'm not able to flash a program on it. I'm always getting this error : 

ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.
FATAL ERROR: command exited with status 33: nrfjprog --program /home/ahayoz/zephyrproject/code/SAMPLES/beacon_le_ds/build/zephyr/zephyr.hex --chiperase -f NRF52 --snr 683699166

I tried to do nrfjprog -e but it gives me the same error. I tried to hard reset and add manually the J-Link OB-SAM3U128-V2NordicSemi170724.bin, still have same error.

The log file is as follow : 

[2021-Feb-19 15:21:40] [ info] --------------------------------------------------------------------------------
[2021-Feb-19 15:21:40] [ info] nrfjprog --program /home/ahayoz/zephyrproject/code/SAMPLES/beacon_le_ds/build/zephyr/zephyr.hex --chiperase -f NRF52 --snr 683699166 --log 
[2021-Feb-19 15:21:40] [ info] nrfjprog version 10.10.0 
[2021-Feb-19 15:21:40] [ info] --------------------------------------------------------------------------------
[2021-Feb-19 15:21:40] [debug] [ nRF0x0] - open_dll
[2021-Feb-19 15:21:40] [debug] [ nRF0x0] - Load library at /opt/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.so.
[2021-Feb-19 15:21:40] [debug] [ nRF0x0] - Library loaded, loading member functions.
[2021-Feb-19 15:21:40] [debug] [ nRF0x0] - Member functions succesfully loaded.
[2021-Feb-19 15:21:40] [debug] [Backend] - Logger callback at 0x564944f57e00 registered in Segger backend logger.
[2021-Feb-19 15:21:40] [debug] [  JLink] - [Debug   ] [JLink     ] Logger callback at 0x564944f57e00 registered in JLink logger.
[2021-Feb-19 15:21:40] [debug] [nRF520x0] - open
[2021-Feb-19 15:21:40] [debug] [Backend] - open_dll
[2021-Feb-19 15:21:40] [debug] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Feb-19 15:21:40] [debug] [Backend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.6.88.1.
[2021-Feb-19 15:21:40] [debug] [Backend] - Library loaded, loading member functions.
[2021-Feb-19 15:21:40] [debug] [Backend] - Member functions succesfully loaded.
[2021-Feb-19 15:21:40] [debug] [Backend] - dll_version
[2021-Feb-19 15:21:40] [debug] [Backend] - Segger dll version 6.88.a loaded.
[2021-Feb-19 15:21:40] [debug] [ nRF0x0] - enum_emu_snr
[2021-Feb-19 15:21:40] [debug] [nRF520x0] - enum_emu_snr
[2021-Feb-19 15:21:40] [debug] [Backend] - is_connected_to_emu
[2021-Feb-19 15:21:40] [debug] [Backend] - enum_emu_snr
[2021-Feb-19 15:21:40] [debug] [Backend] - ---just_enum_emu_snr
[2021-Feb-19 15:21:40] [debug] [Backend] - ---just_get_num_emus
[2021-Feb-19 15:21:41] [debug] [Backend] - is_connected_to_emu
[2021-Feb-19 15:21:41] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Feb-19 15:21:41] [debug] [nRF520x0] - connect_to_emu_with_snr
[2021-Feb-19 15:21:41] [debug] [Backend] - is_connected_to_emu
[2021-Feb-19 15:21:41] [debug] [Backend] - connect_to_emu_with_snr
[2021-Feb-19 15:21:41] [debug] [Backend] - is_connected_to_emu
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_enum_emu_snr
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_get_num_emus
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Feb-19 15:21:41] [debug] [Backend] - Segger logging enabled.
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] Hardware: V1.00
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] S/N: 683699166
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] OEM: SEGGER
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] TELNET listener socket opened on port 19021
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] WEBSRV Starting webserver
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] WEBSRV Webserver running on local port 19080
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 4.874ms returns "O.K."  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Lock()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_GetHWStatus(...)  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.097ms returns 0  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.002ms returns 0x01  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.002ms returns 0x00  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.002ms returns 0x00  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.008ms returns 0  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.287ms returns 0x00  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_SetSpeed(2000)  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.044ms  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_GetSN()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.005ms returns 683699166  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_load_core_data
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.001ms returns 0x00  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_ExecCommand("device = nRF52", ...).   
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] XML file found at: /opt/SEGGER/JLink/JLinkDevices.xml 
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] /opt/SEGGER/JLink/JLinkDevices.xml evaluated successfully. 
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] Device "NRF52" selected.
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 13.265ms returns 0x00  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [Backend] - read_debug_port_idr
[2021-Feb-19 15:21:41] [debug] [Backend] - read_debug_port_register
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_read_debug_port_register
[2021-Feb-19 15:21:41] [debug] [Backend] - coresight_configure
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_Configure()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 100.832ms returns 0  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] failed
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 1.089ms returns -1  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_abort_debug_action
[2021-Feb-19 15:21:41] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.914ms returns -1  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.042ms  
[2021-Feb-19 15:21:41] [debug] [ nRF0x0] - close_dll
[2021-Feb-19 15:21:41] [debug] [nRF520x0] - close
[2021-Feb-19 15:21:41] [debug] [Backend] - is_connected_to_emu
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsOpen()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.014ms returns 0x01  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Lock()  
[2021-Feb-19 15:21:41] [debug] [Backend] - close
[2021-Feb-19 15:21:41] [debug] [Backend] - disconnect_from_emu
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_disconnect_from_emu
[2021-Feb-19 15:21:41] [debug] [Backend] - is_connected_to_device
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_IsConnected()  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.015ms returns FALSE  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_is_debug_region_powered
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_read_debug_port_register
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_write_debug_port_register
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.890ms returns -1  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Feb-19 15:21:41] [debug] [Backend] - ---just_abort_debug_action
[2021-Feb-19 15:21:41] [debug] [Backend] - Attempting to clear any configuration errors in debug port before closing connection. 
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.882ms returns -1  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_HasError()  
[2021-Feb-19 15:21:41] [debug] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] - 0.032ms  
[2021-Feb-19 15:21:41] [debug] [  JLink] - [Debug   ] [JLink     ] JLINK_Close()  
[2021-Feb-19 15:21:41] [debug] [Backend] - Segger Backend closed.
[2021-Feb-19 15:21:41] [debug] [nRF520x0] - nRF family DLL closed

What can I do ?

2nd problem : I tried to use another nRF52840 with the power profiler. I cut the SB40. The problem is that I seem to get wrong measurements. I'm flashing a simple beacon app to test so I'm expecting to get high value from time to time (beacon being send), otherwise low power consumption. Sometimes, the beginning is okey, but then I just have a straight line, and sometimes I seem to get only noise. Why ? The configuration of the power profiler is as follow :

- SW2 on DK

- SW4 on DK

- COM on DK

The jumper is removed when measuring. I removed the USB hub as well. I'm connecting the nRF52840 with an USB cable directly to the computer.

If I test with the device that I can't flash anymore, it's working perfectly, I have the beacon power consumption.

3rd problem : I tried to measure the power consumption of the sparkfun nRF52840 Mini as DUT and using the power profiler. When measuring the beacon app, everything is working great, so I'm able to set up everything correctly. But then measuring a mesh network application, I only see a blue square, or a straight line. Why is that ? 

Best regards.

Parents
  • Hi,

     I assume you are using the first generation PPK and not PPK2?

    1st problem : I had one device with which I could use the power profiler correctly. Unfortunately I'm not able to flash a program on it.

    Are you trying to program the nRF on the DK or the nRF on the power profiler in this case (depending on the COM switch position) Based on the information in the 2nd question that this works with another DK, and the error message I suspect there could be an issue with the communication between the debugger on the DK and the nRF being programmed. If you are trying to program the PPK, then it could be an issue with the headers connecting the two boards. Perhaps some modifications or hard treatment has caused a bad connection or similar?

    2nd problem : I tried to use another nRF52840 with the power profiler. I cut the SB40. The problem is that I seem to get wrong measurements.

    It is a bit interesting that you get seemingly correct measurements with the other DK, which you have issue programming. Could it be that you accidentally programed the nRF on the DK (which is the DUT here?) with the PPK firmware? That will not have the current consumption pattern you expect to see.

    3rd problem : I tried to measure the power consumption of the sparkfun nRF52840 Mini as DUT and using the power profiler. When measuring the beacon app, everything is working great, so I'm able to set up everything correctly. But then measuring a mesh network application, I only see a blue square, or a straight line. Why is that ? 

    You are covering 7 seconds here, so if there is a lot changes in current consumption that would be squashed together and look like a big blue square. It would not be possible to read anything from this plot. I suggest you look at a much smaller time window.

    Einar

  • Hello,

    Thank you for your answer.

     I assume you are using the first generation PPK and not PPK2?

    Yes it's the first generation PPK.

    1st problem :

    Are you trying to program the nRF on the DK or the nRF on the power profiler in this case (depending on the COM switch position)

    I'm trying to program the nRF on the DK. When I'm trying to flash, the power profiler isn't set on the DK, it's removed. I only have a DK with the jumper.

    I suspect there could be an issue with the communication between the debugger on the DK and the nRF being programmed

    Is there a way to repair it ? 

    2nd problem :

    Could it be that you accidentally programed the nRF on the DK (which is the DUT here?) with the PPK firmware?

    Well, here is the procedure I followed :

    • Remove the power profiler from any nRF
    • Setup the jumper on the nRF with cut SB40
    • Flash the beacon program, verify with nRF connect App that we really have a beacon device
    • Turn off the nRF, setup the power profiler on the nRF, remove the jumper, turn on 
    • Open the Power Profiler app, select device. It doesn't ask to flash so I suppose it's ok ?
    • The first result was this, then I closed and reopened the Power profiler app and had only noise like the image in the original post.

    For the sake of the experiment, I tried to setup the power profiler on the nRF that I can't flash again. I have the right Power Profiler output.

    3rd problem :

    You are covering 7 seconds here, so if there is a lot changes in current consumption that would be squashed together and look like a big blue square.

    Yes you are right but if I zoom in, I just have line going from down to up, there is no sense. And this blue square would be followed by a straight line.
    I wanted to be able to flash the first device to see once again how the Power Profiler sees the mesh at the beginning as it's normal to have a lot of packets sending and receiving before and during provisioning but it's certainly not a blue square :)

    I just was wondering if the change of device could impact the measurements, dunno.

    Best regards

Reply
  • Hello,

    Thank you for your answer.

     I assume you are using the first generation PPK and not PPK2?

    Yes it's the first generation PPK.

    1st problem :

    Are you trying to program the nRF on the DK or the nRF on the power profiler in this case (depending on the COM switch position)

    I'm trying to program the nRF on the DK. When I'm trying to flash, the power profiler isn't set on the DK, it's removed. I only have a DK with the jumper.

    I suspect there could be an issue with the communication between the debugger on the DK and the nRF being programmed

    Is there a way to repair it ? 

    2nd problem :

    Could it be that you accidentally programed the nRF on the DK (which is the DUT here?) with the PPK firmware?

    Well, here is the procedure I followed :

    • Remove the power profiler from any nRF
    • Setup the jumper on the nRF with cut SB40
    • Flash the beacon program, verify with nRF connect App that we really have a beacon device
    • Turn off the nRF, setup the power profiler on the nRF, remove the jumper, turn on 
    • Open the Power Profiler app, select device. It doesn't ask to flash so I suppose it's ok ?
    • The first result was this, then I closed and reopened the Power profiler app and had only noise like the image in the original post.

    For the sake of the experiment, I tried to setup the power profiler on the nRF that I can't flash again. I have the right Power Profiler output.

    3rd problem :

    You are covering 7 seconds here, so if there is a lot changes in current consumption that would be squashed together and look like a big blue square.

    Yes you are right but if I zoom in, I just have line going from down to up, there is no sense. And this blue square would be followed by a straight line.
    I wanted to be able to flash the first device to see once again how the Power Profiler sees the mesh at the beginning as it's normal to have a lot of packets sending and receiving before and during provisioning but it's certainly not a blue square :)

    I just was wondering if the change of device could impact the measurements, dunno.

    Best regards

Children
  • Hi,

    Ripitchip00 said:
    Is there a way to repair it ? 

    I cannot really say, but if it is an issue with bad contact (let's say bad soldering because of mechanical strain or similar) you could try to find it and fix it. This was jus tan idea, though - I cannot say for sure that is part of the problem.

    Regarding the general behaviour you see I am not able to reproduce or find similar past reports. Just as a shot in the dark, could you try to re-flash the onboard debugger on the DK's and see if that has any effect? You can put the debugger in DFU mode by holding the reset button while power-cycling. Then copy 6888.J-Link OB-SAM3U128-V2-NordicSemi 170724.bin onto it , wait a bit and power-cycle again. Does it change anything with any of the two DKs?

Related