This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLPNIRNANOEVM: Scan configuration validation

Part Number: DLPNIRNANOEVM


Hello,

We have been developing an application that uses a NIR Nano ( v2.0.1 ) and the DLP Spectrum Library (v2.0.2).

Lately I've noticed a bug in our application that lead to invalid configurations (specifically exposure times outside the EXP_TIME enum) being written to the device.

Performing a scan with this configuration seems to go on indefinitely, until I power down the Nano.

While scanning NNO_ReadDeviceStatus() returns a status value of 7  (NNO_STATUS_TIVA | NNO_STATUS_SCAN_IN_PROGRESS | NNO_STATUS_SD_CARD_PRESENT) and NNO_ReadErrorStatus() keeps returning zero values (i.e. no errors).

With this invalid configuration, NNO_GetEstimatedScanTime() returns the same time as when I configure the exposure time to be 0.635 ms.

Besides fixing the bug that caused this invalid configuration to exist in the first place, I've been trying to figure out how to validate the configurations in the device before actually starting the scan to prevent similar issues.

As far as I can tell, there is no validation (of exposure time at least) in the (de)serialization functions dlpspec_scan_write_configuration() and dlpspec_scan_read_configuration().

The functions that actually write the configurations (NNO_ApplyScanConfig(), NNO_SaveScanCfgInEVM(), NNO_SetActiveScanIndex()) don't seem to validate it etiher.

Do I have to read, deserialize and verify everything manually, or are there existing functions that I am overlooking?

Thanks in advance