Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

INA219 Sensor wrong data display

Hello Community,

I'm using the current sensor INA219 with NRF5340dk.
Communication is through i²c protocol and using nrf SDK v1.7.0 .
I'm trying to get the data output (Voltage, Current, Power).
i worked on the sample linked on Zephyr Lib. the problem is that i'm always getting the same output which i liked below

the wiring of the sensor is like below :

Vin->VDD nrf
GND->GND
SCL->P0.26
SDA->P0.25

I'm always getting the current and power to Null values and both voltage values don't change no matter what !
do i need to change the calibration values or do i need to do something else ?
i don't get what's wrong with the data output so i need your help please
can you help me get the right values and get the data displayed out from the sensor correctly, please

Kindly,
Many thanks
 

Parents
  • Hi,

    INA219 examle in Zephyr writes very strange (IMHO incorrect) value into configuration register. Try to replace it with default one:

    	/* Configurate the chip using default values */
    	data[0] = 0x39;
    	data[1] = 0x9f;

  • i already changed that before i putted the message on the forum 
    for now i changed the pins and changed my overlay file according to the new pin numbers 
    and i always took the comment of Dmitry in consideration and i changed the addresses and now it's being so strange 

  • Hello again, 
    i followed the instructions you gave to me 
    i uninstalled the toolchain Manager and i reinstalled it. 
    this time i no longer have the window which pops up when i try to open the overlay file.
    but the error message on the psa_crypto_slot_management.c persists 

    Building ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir’ from solution ‘build’ in configuration ‘Common’
    1> Checking ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir’
    1> 'modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir' is up to date
    Building ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download’ from solution ‘build’ in configuration ‘Common’
    1> Checking ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download’
    1> 'modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download' is up to date
    Building ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update’ from solution ‘build’ in configuration ‘Common’
    1> Checking ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update’
    1> 'modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update' is up to date
    Building ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch’ from solution ‘build’ in configuration ‘Common’
    1> Checking ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch’
    1> 'modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch' is up to date
    Building ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure’ from solution ‘build’ in configuration ‘Common’
    1> Checking ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure’
    1> 'modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure' is up to date
    Building ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build’ from solution ‘build’ in configuration ‘Common’
    1> Checking ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build’
    1> modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build does not exist.
    1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build’
    1> C:\Users\rzaafouri\ncs\v1.8.0\toolchain\opt\bin\cmake.exe --build . --
    1> [1/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/aesni.c.obj
    1> [2/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/arc4.c.obj
    1> [3/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/aria.c.obj
    1> [4/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/camellia.c.obj
    1> [5/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/blowfish.c.obj
    1> [6/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/debug.c.obj
    1> [7/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/cipher_wrap.c.obj
    1> [8/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/base64.c.obj
    1> [9/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/asn1parse.c.obj
    1> [10/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/des.c.obj
    1> [11/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/asn1write.c.obj
    1> [12/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/ctr_drbg.c.obj
    1> [13/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/havege.c.obj
    1> [14/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/d72279290683467189ff29b11581dd36/library/entropy_poll.c.obj
    1> [15/215] Generating objects/cc3xx.mon
    1> [16/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/md5.c.obj
    1> [17/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/md2.c.obj
    1> [18/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/error.c.obj
    1> [19/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/gcm.c.obj
    1> [20/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/entropy.c.obj
    1> [21/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/md4.c.obj
    1> [22/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/pk_wrap.c.obj
    1> [23/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/cipher.c.obj
    1> [24/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/hkdf.c.obj
    1> [25/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/nist_kw.c.obj
    1> [26/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/pk.c.obj
    1> [27/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/padlock.c.obj
    1> [28/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/pkcs12.c.obj
    1> [29/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/hmac_drbg.c.obj
    1> [30/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/pkparse.c.obj
    1> [31/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/d72279290683467189ff29b11581dd36/library/platform_util.c.obj
    1> [32/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/md.c.obj
    1> [33/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/pkwrite.c.obj
    1> [34/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/timing.c.obj
    1> [35/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/pkcs5.c.obj
    1> [36/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/ripemd160.c.obj
    1> [37/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/platform.c.obj
    1> [38/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/xtea.c.obj
    1> [39/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/oid.c.obj
    1> [40/215] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    1> [41/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/d85dbc57772358a87a5af58114fbe078/psa_crypto_client.c.obj
    1> [42/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/version.c.obj
    1> [43/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto.c.obj
    1> [44/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/d72279290683467189ff29b11581dd36/library/version_features.c.obj
    1> [45/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_slot_management.c.obj
    1> FAILED: modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_slot_management.c.obj 
    1> C:\Users\rzaafouri\ncs\v1.8.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DPSA_CRYPTO_SECURE -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/include -Izephyr/include/generated -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/lib/libc/minimal/include -IC:/Users/rzaafouri/ncs/v1.8.0/nrf/include -IC:/Users/rzaafouri/ncs/v1.8.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/rzaafouri/ncs/v1.8.0/modules/hal/nordic/nrfx -IC:/Users/rzaafouri/ncs/v1.8.0/modules/hal/nordic/nrfx/drivers/include -IC:/Users/rzaafouri/ncs/v1.8.0/modules/hal/nordic/nrfx/mdk -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/modules/hal_nordic/nrfx/. -Ic:/users/rzaafouri/ncs/v1.8.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -Ic:/users/rzaafouri/ncs/v1.8.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -IC:/Users/rzaafouri/ncs/v1.8.0/nrf/samples/spm/kernel/include -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/arch/arm/include -IC:/Users/rzaafouri/ncs/v1.8.0/nrfxlib/crypto/nrf_cc312_platform/include -Imodules/nrfxlib/nrfxlib/nrf_security/include/mbedtls_generated/mbedtls -Imodules/nrfxlib/nrfxlib/nrf_security/include/mbedtls_generated -Imodules/nrfxlib/nrfxlib/nrf_security/include -IC:/Users/rzaafouri/ncs/v1.8.0/nrfxlib/nrf_security/include -IC:/Users/rzaafouri/ncs/v1.8.0/mbedtls/library -IC:/Users/rzaafouri/ncs/v1.8.0/mbedtls/include -IC:/Users/rzaafouri/ncs/v1.8.0/mbedtls/include/mbedtls -IC:/Users/rzaafouri/ncs/v1.8.0/mbedtls/include/psa -IC:/Users/rzaafouri/ncs/v1.8.0/nrfxlib/nrf_security/include/mbedcrypto_glue/mbedtls/threading -Os -imacros C:/Users/rzaafouri/ncs/v1.8.0/zephyr/samples/sensor/ina219/build_nrf5340dk_nrf5340_cpuapp_ns/spm/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/Users/rzaafouri/ncs/v1.8.0/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/rzaafouri/ncs/v1.8.0/nrf/samples/spm=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/rzaafouri/ncs/v1.8.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/rzaafouri/ncs/v1.8.0=WEST_TOPDIR -ffunction-sections -fdata-sections -mcmse -std=c99 -nostdinc -MD -MT modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_slot_management.c.obj -MF modules\nrfxlib\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\mbedcrypto_base_vanilla.dir\C_\Users\rzaafouri\ncs\v1.8.0\mbedtls\library\psa_crypto_slot_management.c.obj.d -o modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_slot_management.c.obj -c C:/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_slot_management.c
    1> C:/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_slot_management.c:22: fatal error: opening dependency file modules\nrfxlib\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\mbedcrypto_base_vanilla.dir\C_\Users\rzaafouri\ncs\v1.8.0\mbedtls\library\psa_crypto_slot_management.c.obj.d: No such file or directory
    1>    22 | 
    1>       | 
    1> compilation terminated.
    1> [46/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_driver_wrappers.c.obj
    1> FAILED: modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_driver_wrappers.c.obj 
    1> C:\Users\rzaafouri\ncs\v1.8.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DPSA_CRYPTO_SECURE -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/include -Izephyr/include/generated -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/lib/libc/minimal/include -IC:/Users/rzaafouri/ncs/v1.8.0/nrf/include -IC:/Users/rzaafouri/ncs/v1.8.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/rzaafouri/ncs/v1.8.0/modules/hal/nordic/nrfx -IC:/Users/rzaafouri/ncs/v1.8.0/modules/hal/nordic/nrfx/drivers/include -IC:/Users/rzaafouri/ncs/v1.8.0/modules/hal/nordic/nrfx/mdk -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/modules/hal_nordic/nrfx/. -Ic:/users/rzaafouri/ncs/v1.8.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -Ic:/users/rzaafouri/ncs/v1.8.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -IC:/Users/rzaafouri/ncs/v1.8.0/nrf/samples/spm/kernel/include -IC:/Users/rzaafouri/ncs/v1.8.0/zephyr/arch/arm/include -IC:/Users/rzaafouri/ncs/v1.8.0/nrfxlib/crypto/nrf_cc312_platform/include -Imodules/nrfxlib/nrfxlib/nrf_security/include/mbedtls_generated/mbedtls -Imodules/nrfxlib/nrfxlib/nrf_security/include/mbedtls_generated -Imodules/nrfxlib/nrfxlib/nrf_security/include -IC:/Users/rzaafouri/ncs/v1.8.0/nrfxlib/nrf_security/include -IC:/Users/rzaafouri/ncs/v1.8.0/mbedtls/library -IC:/Users/rzaafouri/ncs/v1.8.0/mbedtls/include -IC:/Users/rzaafouri/ncs/v1.8.0/mbedtls/include/mbedtls -IC:/Users/rzaafouri/ncs/v1.8.0/mbedtls/include/psa -IC:/Users/rzaafouri/ncs/v1.8.0/nrfxlib/nrf_security/include/mbedcrypto_glue/mbedtls/threading -Os -imacros C:/Users/rzaafouri/ncs/v1.8.0/zephyr/samples/sensor/ina219/build_nrf5340dk_nrf5340_cpuapp_ns/spm/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/Users/rzaafouri/ncs/v1.8.0/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/rzaafouri/ncs/v1.8.0/nrf/samples/spm=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/rzaafouri/ncs/v1.8.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/rzaafouri/ncs/v1.8.0=WEST_TOPDIR -ffunction-sections -fdata-sections -mcmse -std=c99 -nostdinc -MD -MT modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_driver_wrappers.c.obj -MF modules\nrfxlib\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\mbedcrypto_base_vanilla.dir\C_\Users\rzaafouri\ncs\v1.8.0\mbedtls\library\psa_crypto_driver_wrappers.c.obj.d -o modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_driver_wrappers.c.obj -c C:/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_driver_wrappers.c
    1> C:/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/psa_crypto_driver_wrappers.c:1067:1: fatal error: opening dependency file modules\nrfxlib\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\mbedcrypto_base_vanilla.dir\C_\Users\rzaafouri\ncs\v1.8.0\mbedtls\library\psa_crypto_driver_wrappers.c.obj.d: No such file or directory
    1>  1067 | }
    1>       | ^
    1> compilation terminated.
    1> [47/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/d85dbc57772358a87a5af58114fbe078/psa_crypto_storage.c.obj
    1> [48/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/d72279290683467189ff29b11581dd36/library/psa_crypto_rsa.c.obj
    1> [49/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/d72279290683467189ff29b11581dd36/library/psa_crypto_ecp.c.obj
    1> [50/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/replacements/pem.c.obj
    1> [51/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/sha512.c.obj
    1> [52/215] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedcrypto_base_vanilla.dir/C_/Users/rzaafouri/ncs/v1.8.0/mbedtls/library/bignum.c.obj
    1> [53/215] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    1> [54/215] Generating include/generated/driver-validation.h
    1> [55/215] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    1> ninja: build stopped: subcommand failed.
    Build failed


    in your opinion what is causing this error ? 
    is it the update to the new version or it something related to the INA219 project ?

    Kindly, 
    Many thanks 

  • It's could be a problem in the build folder, if you haven't deleted it in a while, so you can try deleting it and rebuilding.

    Did you reinstall the v1.8.0 SDK? If you did not, you can try that if deleting the build folder does not work. And like I said in my previous comment, make sure that it is completely finished installing before clicking any buttons.
    By reinstalling I mean removing it and then reinstalling:

  • yeah i did it 
    i removed and gave it the time to install correctly 
    i deleted the build folder 
    i figured out that i didn't add the DK on the plateform_allow in the sample.yaml 
    now after i added nrf5340dk_nrf5340cpuapp it works properly and it builds properly 

    sample:
      name: TI INA219 power/current monitor
      description: Demonstration of the INA219 I2C power/current monitor
    tests:
      sample.drivers.ina219:
        build_only: true
        platform_allow: nrf5340dk_nrf5340cpuapp blackpill_f411ce
        tags: sensors

    but when i try to debug it i have no output on the Terminal emulator 
    is there another trick to do to get the sensor data displayed please ? 
    do i need to activate something on the sensor ? 


    Kindly,
    Many thanks 

  • Try removing CONFIG_STDOUT_CONSOLE=y from prj.conf.

    If that doesn't fix it replace CONFIG_CBPRINTF_FP_SUPPORT=y with CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y.

  • i tried removing CONFIG_STDOUT_CONSOLE=y from prj.conf
    it didn't fix the problem 
    replaced CONFIG_CBPRINTF_FP_SUPPORT=y with CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y with CONFIG_STDOUT_CONSOLE=y being removed
    it didn't work neither 
    there's no output message on the the terminal 
    emulator

Reply
  • i tried removing CONFIG_STDOUT_CONSOLE=y from prj.conf
    it didn't fix the problem 
    replaced CONFIG_CBPRINTF_FP_SUPPORT=y with CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y with CONFIG_STDOUT_CONSOLE=y being removed
    it didn't work neither 
    there's no output message on the the terminal 
    emulator

Children
  • i deleted the build file between the two changes 
    to eliminate the probability of error 

    i even added some logs before and after this part 

    	if (!device_is_ready(ina)) {
    		printf("Device %s is not ready.\n", ina->name);
    		return;
    	}

    but none of these logs was displayed 

  • Ok, just tested it myself. You can undo the changes to the prj.conf I suggested in my last reply.

    What terminal are you using? The one in SES only works for RTT as far as I know, you want something like PuTTY

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_testing.html

    I get output on the COM port when I test the sample.

  • when i was on the V1.7.0 i used to visualize data on the terminal of SES.
    infact the snipped output photo was from there ( but the data wasn't correctly displayed).
    but for now i just downloaded Putty to be able to visualize data.
    but i'm not really familiar with it.
    can you give helpful links please to be able to use it and visualize data through it.
    and how can i link it to SES built ?  

  • The link I sent explains how to set up PuTTY.

    Set up the settings for Serial connections:

    Set up the settings for the terminal:

    Then select Serial for the session, and save your settings, then open the terminal:

  • Hello 
    I managed to get output on the SES terminal 
    and it says that the device is not ready 

    i will put also my overlay file below 

    &i2c1 {
    	status = "okay";
    	sda-pin = < 34 >;
    	scl-pin = < 35 >;
        clock-frequency = <100000>; 
    	
    	ina219: ina219@40 {
            status = "okay";
    		compatible = "ti,ina219";
    		reg = <0x40>;
    		label = "INA219";
    		brng = <0>;
    		pg = <0>;
    		sadc = <13>;
    		badc = <13>;
    		shunt-milliohm = <100>;
    		lsb-microamp = <10>;
    	};
    };
    
    &uart1 {
        status = "disabled";
    };


    is it an I²C problem like in V1.7.0 
    the user needs to change I²C to make it work ? or what may be causing this problem ? 
    can you help me find out please ?

Related