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.

DLP Spectrum Library

1. 通过Ti的GUI将参数Width in nm分别设置为7.02和12.87时,得到的光谱能量有明显差异。但是我们通过自己的代码调用Ti接口dlpspec_scan_write_configuration将参数值设为12.87时得到的光谱和7.02时完全一致。目前不清楚是参数设置失败还是其他原因?

2.利用Ti提供的源程序编译生成DLPNIRscanNanoGUI_1.1.9时失败。原因是DLP Spectrum Library的源码中只有.h和.a 文件,没有对应的.c(使用的编译环境为VS2010)。我们试图在官网找DLP Spectrum Library库的源代码,但是没有找到。Ti能否提供这个库源码(.c)或者DLPNIRscanNanoGUI_1.1.9中使用的这个库(.lib)?

  • 1.  7.02分辨率要高些,但是相差不会那么明显;我找个TI NANO 测试一下.

    2. DLPNIRscanNanoGUI_1.1.9使用的DLP Spectrum Library就是1.1.5的(参考dlpspec_version.h, DLPNIRscanNanoGUI_1.1.9)

    http://www.deyisupport.com/question_answer/dlp_mems/f/106/p/118456/325837.aspx#325837

    DLP Spectrum Library    Active    1.1.5    9/24/2015   Download  

    DLP Spectrum Library     Active     1.1.5     9/24/2015     Download


    现在的最新是2.0.2

  • 请问直接运行build-lib.bat就可以生成lib吗?   我双击运行无效

  • 参考文档资料: http://www.ti.com/lit/ug/dlpu030f/dlpu030f.pdf

    第58页.

  • 请教一下

     

    tpl_err = tpl_load(tn, TPL_MEM|TPL_EXCESS_OK, struct_p, buffer_size);

     

    ERR_DLPSPEC_TPL                =  -4,    这是什么错误类型?  该如何解决?

  • #define ERR_NOT_MINSIZE (-1)
    #define ERR_MAGIC_MISMATCH (-2)
    #define ERR_INCONSISTENT_SZ (-3)
    #define ERR_FMT_INVALID (-4)
    #define ERR_FMT_MISSING_NUL (-5)
    #define ERR_FMT_MISMATCH (-6)
    #define ERR_FLEN_MISMATCH (-7)
    #define ERR_INCONSISTENT_SZ2 (-8)
    #define ERR_INCONSISTENT_SZ3 (-9)
    #define ERR_INCONSISTENT_SZ4 (-10)
    #define ERR_UNSUPPORTED_FLAGS (-11)

  • 为什么DLPNIRscanNanoGUI_1.1.9 源码编译还有那么多错误呢?     版本:  qt-opensource-windows-x86-msvc2010-5.2.1

  • 使用下列编译器:

    http://software-dl.ti.com/dsps/forms/self_cert_export.html?prod_no=qt-opensource-windows-x86-mingw491_opengl-5.4.2.zip&ref_url=http://software-dl.ti.com/analog/analog_public_sw/dlp

    不是使用MSVC2010的.

  • 你好,请问tpl.h  tpl.c这两个文件是什么作用?  怎么用到msvc环境中编译呢?

  • 你好,请教一下 tpl.c中的函数 tpl_err = tpl_load(tn, TPL_MEM|TPL_EXCESS_OK, struct_p, buffer_size);     总是失败,真是为什么吗?

  • 在采集完成后在执行Spectrum.cpp 102行dlpspec_scan_interpReference函数   然后单步直到跳转到tpl.c 1545行时出错

  • TPL是第三方库:

    http://troydhanson.github.io/tpl/

    如果MS2010,要定义.

    #ifdef _MSC_VER
    typedef unsigned int uint32_t;
    #else
    #include <inttypes.h> /* uint32_t */
    #endif

  • 参考:

    http://troydhanson.github.io/tpl/userguide.html#tpl_load

    tpl_load

    This API function reads a previously-dumped tpl image from a file, memory buffer or file descriptor, and prepares it for subsequent unpacking. The format string specified in the preceding call to tpl_map() will be cross-checked for equality with the format string stored in the tpl image.

    tn = tpl_map( "A(i)", &i ); tpl_load( tn, TPL_FILE, "demo.tpl" );

    The first argument to tpl_load() is the tpl_node*. The second argument is one of the constants:

    TPL_FILE

    Loads the tpl from the file named in the following argument. It is also possible to bitwise-OR this flag with TPL_EXCESS_OK as explained below.

    TPL_MEM

    Loads the tpl from a memory buffer. The following two arguments must be a void* and a size_t, specifying the buffer address and size, respectively. The caller must not free the memory buffer until after freeing the tpl with tpl_free(). (If the caller wishes to hand over responsibility for freeing the memory buffer, so that it’s automatically freed along with the tpl when tpl_free() is called, the constant TPL_UFREE may be bitwise-OR’d with TPL_MEM to achieve this). Furthermore, TPL_MEM may be bitwise-OR’d with TPL_EXCESS_OK, explained below.

    TPL_FD

    Loads the tpl from the file descriptor given in the following argument. The descriptor is read until one complete tpl image is loaded; no bytes past the end of the tpl image will be read. The descriptor can be either blocking or non-blocking, but will busy-loop if non-blocking and the contents cannot be read immediately.

    During loading, the tpl image will be extensively checked for internal validity.

    This function returns 0 on success or -1 on error.

    TPL_EXCESS_OK

    When reading a tpl image from a file or memory (but not from a file descriptor) the size of the file or memory buffer must exactly equal that of the tpl image stored therein. In other words, no excess trailing data beyond the tpl image is permitted. The bit flag TPL_EXCESS_OK can be OR’d with TPL_MEM or TPL_FILE to relax this requirement.

    A situation where this flag can be useful is in conjunction with tpl_dump in the TPL_MEM|TPL_PREALLOCD mode. In this example, the program does not concern itself with the actual tpl size as long as LEN is sufficiently large.

    char buf[LEN]; /* will store and read tpl images here */ ... tpl_dump(tn, TPL_MEM|TPL_PREALLOCD, buf, LEN); ... tpl_load(tn, TPL_MEM|TPL_EXCESS_OK, buf, LEN);
  • 谢谢你的支持

  • 我想问一下怎么通过DLPNIRscanNanoSoftware_1.1.8禁用休眠模式

    TIVA v1.1.8的source code中有一個nano_timer.c檔(如附件), 其中 nano_timer_handler(void)控制了hibernate mode. 貴司可以disable或移除下面框起來的if( )程式碼來關閉hibernate mode.

     

    ===

    In nano_timer.c, a function named nano_timer_handler(void) which controls hibernate mode and BLE off.

    Disable or remove if() function that can turn off hibernate mode.

    我想问的是改完代码以后,直接运行ti\DLPNIRscanNanoSoftware_1.1.8\Sources下的NIRscanNano.cmd就可以吗? 还是需要怎么做,才能完全实现禁用休眠模式?

  • 要按照http://www.ti.com/lit/ug/dlpu030f/dlpu030f.pdf

    第56页安装编译工具;

    和第58页C1.2.来编译library.