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

GPS Sample code works, but how do you reduce power?

I got this project to compile and work: https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/nrf9160/gps

I have the latest radio firmware at this time: 0.7.0_29.  I'm actually using a DK 0.8.2 which required an external antenna, but when I use one it works fine.

I measure constant current around 30mA when doing this. 

According to this, there seems to be 2 lower power modes below what this sample is using: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf9160%2F_tmp%2Falta.nRF9160%2Fautodita%2FCURRENT%2Fparameters.id_current_gps.html&resultof=%22%67%70%73%22%20%22%67%70%22%20

Also some information on lower power modes here: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf9160%2Fgps.html&resultof=%22%67%70%73%22%20%22%67%70%22%20

Is there any guidance on getting the radio into these lower power modes?  Are these modes implemented in the radio firmware at this time?

  • That was the ns version.  When I try to select the non ns version I get a different error

    CMakeOutput.log

    The target system is: Generic - 1.14.99 - arm
    The host system is: Windows - 10.0.17134 - AMD64
    Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
    Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe 
    Build flags: 
    Id flags: -c 
    
    The output was:
    0
    
    
    Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"
    
    The C compiler identification is GNU, found in "C:/git/nRF/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/3.13.2/CompilerIdC/CMakeCCompilerId.o"
    
    Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
    Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe 
    Build flags: 
    Id flags: -c 
    
    The output was:
    0
    
    
    Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"
    
    The CXX compiler identification is GNU, found in "C:/git/nRF/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/3.13.2/CompilerIdCXX/CMakeCXXCompilerId.o"
    
    Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
    arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
    Copyright (C) 2017 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    Performing C SOURCE FILE Test toolchain_is_ok succeeded with the following output:
    Change Dir: C:/git/nRF/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/CMakeTmp
    
    Run Build Command:"C:/ProgramData/chocolatey/bin/ninja.exe" "cmTC_8d7d6"
    [1/2] Building C object CMakeFiles/cmTC_8d7d6.dir/src.c.obj
    
    [2/2] Linking C executable cmTC_8d7d6
    
    c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 00008000
    
    
    Source file was:
    int main(void) { return 0; }
    

    CMakeError.log

    Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
    Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe 
    Build flags: 
    Id flags:  
    
    The output was:
    1
    c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
    exit.c:(.text.exit+0x2c): undefined reference to `_exit'
    collect2.exe: error: ld returned 1 exit status
    
    
    Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
    Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe 
    Build flags: 
    Id flags:  
    
    The output was:
    1
    c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
    exit.c:(.text.exit+0x2c): undefined reference to `_exit'
    collect2.exe: error: ld returned 1 exit status
    
    
    

  • Hi Steven,

    There is a possibility that you have modified something invalid in the prj.conf file from something else than what's default.

    If so please try to change that back.

    Then I want you to delete the build folder and then try to open the project again.

    If you get a new error, please share what's in the Output terminal:

  • Martin, forgive me if I'm missing things, I'm still trying to wrap my head around Git, Github,west and all the branches and versions of all the repos. 

    Are you showing me "what's default" for the 1.0 tagged release?  You are showing me: https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/v1.0.0/applications/asset_tracker/prj.conf

    That works fine.  I'm referring to your earlier post where you said:

    The new modem firmware supports GPS in PSM mode.
    Here is an example code on how you can use it.

    And that prj.conf file is here (I believe, If I'm using github correctly)

    https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/47ac0f4d375966d8b1c16e30439aef3024a65075/applications/asset_tracker/prj.conf

    I'm trying to use the link you posted to try GPS in PSM mode using the example code how to use it and I can't even open the project when I try that code.  That prj.conf file has differences.  When I try I get those errors and nothing in the output terminal. 

  • Hi Steven,

    I am sorry for the confusion this older link to the PR may have caused. There was made another PR that added GPS which is now merged with master branch in NCS.

    I highly recommend you to update to master branch to test out the real GPS which is added in the asset_tracker sample.

    cd ncs/nrf
    git checkout master
    git pull
    west update
    
    cd applications/asset_tracker
    west build -b nrf9160_pca10090ns -d build_gps
    nrfjprog -e
    west flash -d build_gps

    Then you can push down the "button_1" for 10 seconds and you will turn on the GPS functionality.

  • Does that add "real" GPS instead of the circle around Nordic's headquarters?  What about the low power modes for GPS?  I've tested "real" GPS and that works, but I was looking at testing the low power modes.

Related