invalid sensor output data

Hello Community,

I'm using the current sensor INA219 with NRF5340dk.
Communication is through i²c protocol and using nrf SDK v1.8.0 .
I'm trying to get the data output (Bus, Current, Power).
i worked on the sample linked on Zephyr Lib.
The problem is:
i connected the sensor to a DC Power Supply i gave it 0.47 in entry but the sensor is blocked on 0.39999 
i think there's a range limit or something like that to configure 
do you have any idea what to do get the right values displayed on the power supply 
i will attach explaining pictures below

i even tried with the voltage the sensor is not indicating the right values that i give through the power supply

ddoes anyone knows what might be causing this please ?

the wiring of the sensor is like below :

Vin->VDD
GND->GND
SCL->P1.03
SDA->P1.02

and i think there's something to do also with the voltage because it's not indicating the right values displayed on the power supply 
is there a range to play with or a gap of values to change ? 
are you familiar with that please ?

Kindly,
thank you in advance 

Parents
  • Hello again, 
    i even looked through clock frequency speed to try to change 
    i though maybe the problem is coming from the HFCLKCTRL
    so i added the code to change clock speed from 64MHZ to 128MHZ

     *(volatile uint32_t *)0x5084450C = 0x4040;
            *(volatile uint32_t *)0x50026548 = 0x40;
            *(volatile uint32_t *)0x50081EE4 = 0x4D;
            NRF_CLOCK_S->HFCLKCTRL = 0;
    

    i added this to the main but doesn't seem to affect nothing 
    can someone help me with this please
    thank you in advance 

Reply
  • Hello again, 
    i even looked through clock frequency speed to try to change 
    i though maybe the problem is coming from the HFCLKCTRL
    so i added the code to change clock speed from 64MHZ to 128MHZ

     *(volatile uint32_t *)0x5084450C = 0x4040;
            *(volatile uint32_t *)0x50026548 = 0x40;
            *(volatile uint32_t *)0x50081EE4 = 0x4D;
            NRF_CLOCK_S->HFCLKCTRL = 0;
    

    i added this to the main but doesn't seem to affect nothing 
    can someone help me with this please
    thank you in advance 

Children
Related