Post Go back to editing

Failed to overwrite the device attributes value

Thread Summary

The user encountered an issue where the AD-PQMON-SL device was not correctly displaying the Epoch time when using iio_device_attr_write_double() on a Linux system (Banana Pi BPI-M4). The problem was resolved by removing the coding in iio_pqm.c that was incorrectly handling the `CURRENT_TIMESTAMP` attribute. The correct implementation now allows the AD-PQMON-SL to sync with the Epoch time accurately.
AI Generated Content
Category: Hardware
Product Number: AD-PQMON-SL

Hardware: AD-PQMON-SL

 

OS: Linux (Installed on Banana Pi BPI-M4)

 

Goal:

  1. Read Epoch time from Linux OS
  2. Send the Epoch time to AD-PQMON-SL by using iio_device_attr_write_double()
  3. AD-PQMON-SL sync time with Epoch time by using adi_pqlib_SetTime()

 

Expected Result from iio_info:

attr 34: current_time value: 1759932365.00

 

Error Result from iio_info:

attr 34: current_time value: 0.00

 

Troubleshooting step has been taken:

For existing attributes like <process_data>, successfully use iio_device_attr_write_double() to change to 0, to enable waveform buffer.

 

Coding and connection:

Edit Notes

Update API adi_pqlib_SetTime()
[edited by: YongLawrence at 12:41 AM (GMT -4) on 9 Oct 2025]