AnsweredAssumed Answered

JN-AN-1220 having trouble setting output to off.

Question asked by lse on Nov 27, 2017
Latest reply on Dec 15, 2017 by lse

I have been using JN-AN-1220 as a template for my end devices to read sensors on I2C (DIO16/17) and SPI(DO0, DO1, DIO18, DIO0, DIO1).  All that works fine.  I am using DIO19 to enable battery monitoring. Below is the code I am using to turn the output off at initialize. 

 

 

#define DIO_READ_BATTERY         19     // DIO19 is for enabling battery monitoring

#define DIO_READ_BATTERY_MASK    (1 << DIO_READ_BATTERY)

 

       vAHI_DioSetDirection(0, DIO_READ_BATTERY_MASK);

       vAHI_DioSetPullup(0, DIO_READ_BATTERY_MASK);

       vAHI_DioSetOutput(0, DIO_READ_BATTERY_MASK);

 

I also try setting it off during the main loop but still not able to see the output turn off.  It stays high all the time.  

 

I read up on JN-UG-3087 that it would need to call to u32AHI_Init() to initialize the API functions and before calling to any integrated peripherals API functions.  When I search for this function inside JN-AN-1220 LightSensor, it is only called on JN517x chip but I am using JN5169.  I am not sure where to go from here.   Below is the circuit.  Any help is appreciated.

Outcomes