I am trying the sample programs on my new nRF9160 feather. Most are working well so far (blink, gps, at_client…) but when I load the accelerometer sample the output is odd and I am not seeing any accelerometer values.
Here is what I get:

*** Booting Zephyr OS build v2.4.99-ncs1  ***
Flash regions		Domain		Permissions
00 02 0x00000 0x18000 	Secure		rwxl
03 31 0x18000 0x100000 	Non-Secure	rwxl

Non-secure callable region 0 placed in flash region 2 with size 32.

SRAM region		Domain		Permissions
00 07 0x00000 0x10000 	Secure		rwxl
08 31 0x10000 0x40000 	Non-Secure	rwxl

Peripheral		Domain		Status
00 NRF_P0               Non-Secure	OK
01 NRF_CLOCK            Non-Secure	OK
02 NRF_RTC0             Non-Secure	OK
03 NRF_RTC1             Non-Secure	OK
04 NRF_NVMC             Non-Secure	OK
05 NRF_UARTE1           Non-Secure	OK
06 NRF_UARTE2           Secure		SKIP
07 NRF_TWIM2            Non-Secure	OK
08 NRF_SPIM3            Non-Secure	OK
09 NRF_TIMER0           Non-Secure	OK
10 NRF_TIMER1           Non-Secure	OK
11 NRF_TIMER2           Non-Secure	OK
12 NRF_SAADC            Non-Secure	OK
13 NRF_PWM0             Non-Secure	OK
14 NRF_PWM1             Non-Secure	OK
15 NRF_PWM2             Non-Secure	OK
16 NRF_PWM3             Non-Secure	OK
17 NRF_WDT              Non-Secure	OK
18 NRF_IPC              Non-Secure	OK
19 NRF_VMC              Non-Secure	OK
20 NRF_FPU              Non-Secure	OK
21 NRF_EGU1             Non-Secure	OK
22 NRF_EGU2             Non-Secure	OK
23 NRF_DPPIC            Non-Secure	OK
24 NRF_REGULATORS       Non-Secure	OK
25 NRF_GPIOTE1          Non-Secure	OK

SPM: NS image at 0x1c200
SPM: NS MSP at 0x20010848
SPM: NS reset vector at 0x1e379
?*** Booting Zephyr OS build v2.4.99-ncs1  ***
Sampling at 1 Hz
Waiting for triggers
#1 @ 17 ms: x %f , y %f , z %f
#2 @ 1021 ms: x %f , y %f , z %f
#3 @ 2025 ms: x %f , y %f , z %f
#4 @ 3029 ms: x %f , y %f , z %f
#5 @ 4033 ms: x %f , y %f , z %f
#6 @ 5037 ms: x %f , y %f , z %f
#7 @ 6041 ms: x %f , y %f , z %f

Have I missed something? Why is the code printing %f for the output values?

    jerryneedell which version of NCS are you using? It should be printing floating point numbers. If newlibc floating point is not on it won’t process them.

    I’m actually in this code right now so let me double check things are turned on correctly.

    I added LIBC Printf support and it should work now. If you followed the instructions in the documentation to setup then you should be able to simply run west update and it will pull down my tweaks. Then you can try again. Let me know if you run into any other snags jerryneedell

    hmm.. I did the west update then rebuilt and loaded – now it hangs waiting for triggers..

    
    SPM: NS image at 0x1c200
    SPM: NS MSP at 0x20010a40
    SPM: NS reset vector at 0x1f149
    SPM: prepare to jump to Non-Secure image.
    *** Booting Zephyr OS build v2.4.99-ncs1  ***
    Sampling at 1 Hz
    Waiting for triggers

    I am using NCS v1.5.0 per your guide.

      jerryneedell ahh, did you try building the tracker sample? You may need to run a git reset --hard in the zephyr root directory. (That sample patches the LIS2DH driver).

      ( I will be addressing this issue so this is eventually not necessary )

      I briefly tried tracker but did not have it properly configured so the build failed. I will give it another try tomorrow.
      Thanks for the help.

      yay! I did a git reset --hard in the zephyr root, then west update in the sample directory the accelerometer sample is now working . Thank you!

      s: x 0.000000 , y -0.038304 , z -9.576000
      #2 @ 1021 ms: x 0.000000 , y -0.076608 , z -9.576000
      #3 @ 2026 ms: x 0.038304 , y -0.076608 , z -9.499392
      #4 @ 3031 ms: x 0.076608 , y -0.114912 , z -9.537696
      #5 @ 4035 ms: x -0.038304 , y -0.076608 , z -9.576000
      #6 @ 5040 ms: x -0.038304 , y -0.076608 , z -9.576000
      #7 @ 6045 ms: x -0.038304 , y -0.114912 , z -9.537696
      #8 @ 7049 ms: x 0.000000 , y -0.076608 , z -9.576000
      #9 @ 8054 ms: x -0.038304 , y -0.038304 , z -9.537696
      #10 @ 9059 ms: x -0.038304 , y -0.114912 , z -9.499392
      #11 @ 10063 ms: x 0.000000 , y -0.114912 , z -9.614304

      Just to clarify, it was that I attempted to build the tracker example which caused the issues with the accelerometer sample. So for now the git reset --hard is needed if I have tried to build the tracker example.

      I just ran into hat, I had been messing with the tracker and when I went or go back to the accelerometer example, it was again having waiting for the trigger. repeating the git reset --hard and west update fixed it ..again.

      Terms and Conditions | Privacy Policy