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.

How to save touch screen calibration data?

Other Parts Discussed in Thread: TSC2046

Hello everyone,

Would you please show me how to permanently save the touch screen calibration data in the registry so that I do not have to perform the calibration at every single power-on?

Thanks very much,

Luan

  • Please look at this forum post:

    http://e2e.ti.com/support/embedded/f/353/p/65181/237259.aspx#237259

    It talks about 2 different methods:

     1. Simple solution - enable the IMGNOCALIBRATION flag

     2. enable persistent storage

     

    -Madhvi

     

     

  • Hi Madhvi,

    Thanks for your quick help.  I am going to implement a simple solution for now but for production release, I will need to enable persistent storage.

    I have some more questions for you.  From the previous post, where can I set the flag IMGNOCALIBRATION? Can I set it in the build file tievm_3530.bat?  About the file tsc2046_touch.reg, is it a registry file or a text file?  Where should this file be located?  If possible, would you please point me to the code that look for the flag and the file?

    Thanks for your great support,

    Luan

  • From the batch file name, I am assuming you are using 6.xx release? Correct? If yes, then look in TI_EVM_3530\files\platform.reg and search for IMGNOCALIBRATION flag there. You can set the flag in ti_evm_3530.bat file.

     

  • Hi Madhvi,

    I follow your advice on the page http://e2e.ti.com/support/embedded/f/353/p/65181/237259.aspx#237259 to enable persistent registry but I encounter some problem and have difficulty to get it to work.

    I created a debug build with persistent registry and during the image download, I see a lot of errors on the debug output as attached in this post.

    5340.CEDebugLog.txt

    After the boot completed, I no longer see the folder "Mounted Volume" in My Device as I had before enabling persistent registry.

    I appreciate your help looking at what I did below to see if I am missing anything.  Thanks, Luan.

    In my batch build file, I added

    set IMGREGHIVE=1
    if /i "%IMGREGHIVE%"=="1" set PRJ_ENABLE_FSREGHIVE=1
    if /i "%IMGREGHIVE%"=="1" set PRJ_ENABLE_REGFLUSH_THREAD=1
    if /i "%IMGREGHIVE%"=="1" set PRJ_ENABLE_FSMOUNTASROOT=1
    if /i "%IMGREGHIVE%"=="1" set PRJ_BOOTDEVICE_MSFLASH=1

    In the Catalog, I have the followings included:

    RAM and ROM File System
    exFAT File System
    Hive-based Registry
    FAT File System
    Partition Driver

    In platform.reg,

    ; @CESYSGEN IF FILESYS_FSREGHIVE
    ; HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\Init\BootVars]
        "Flags"=dword:3

    IF IMGREGHIVE
    [HKEY_LOCAL_MACHINE\init\BootVars]
        "SystemHive"="Documents and settings\\system.hv"      ; Set the location and name of the system hive file
        "ProfileDir"="Documents and settings"
        "Start DevMgr"=dword:1 ; Start storage manager in boot phase 1 for hive-based registry
    ENDIF IMGREGHIVE


    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MSFlash]
        "Flags"=dword:00011000  ; load driver in boot phase 1; do not load again later

    ; END HIVE BOOT SECTION
    ; @CESYSGEN ELSE

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MSFlash]
        "Flags"=dword:00010000

    ; @CESYSGEN ENDIF FILESYS_FSREGHIVE
    ;-------------------------------------------------------------------------------

    ;-- Storage Manager Configuration ----------------------------------------------
    ; @CESYSGEN IF CE_MODULES_FSDMGR
    ;
    ; HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
        "DriverPath"="Drivers\\BuiltIn\\MSFlash"
        "LoadFlags"=dword:1
    IF IMGREGHIVE
        "BootPhase"=dword:1          ; Make NAND available in BootPhase1, to load the persisted registry
    ELSE

        "BootPhase"=dword:0
    ENDIF
        "Order"=dword:0

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\FATFS]
    IF IMGREGHIVE
        "MountAsRoot"=dword:1
        "MountAsBootable"=dword:1    
        "MountPermanent"=dword:1     ; Do not allow un-mounting (else we'd fail to flush the registry)
        "MountAsROM"=dword:0
        "MountHidden"=dword:0
     "CheckForFormat"=dword:1     ; Ask the OAL if we should format on boot (i.e. cold reset)
    ENDIF

        "Flags"=dword:00000014
        "FormatTFAT"=dword:1
        "EnableWriteBack"=dword:1

    ; END HIVE BOOT SECTION
    ; @CESYSGEN ENDIF CE_MODULES_FSDMGR

     

  • Luan

    You will no longer see the Mounted volume folder because the NAND is now mounted as Root ("MountAsRoot"=dword:1). So your entrire "My device" folder is on NAND now.

    I do see the errors but not sure what caused them. Is there some other problem you are seeing besides the error messages?

    Thanks

    Madhvi

     

  • Luan,

    You can try the following registry

    ; HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\init\BootVars]
    "Flags"=dword:3

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
    "MountAsBootable"=dword:1
    "MountFlags"=dword:2

    [HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\ObjectStore]
        "MountAsBootable"=-

    [HKEY_LOCAL_MACHINE\System\ObjectStore\RegFlush]
        "SpawnThread"=dword:1
        "FlushPriority256"=dword:FF
        "ActivityThreshold"=dword:100
        "FlushPeriod"=dword:1D4C0

    Regards

    Muragesh Math

  • Hi Muragesh,

    Thanks very much for your suggestion.  I will try your suggestion soon.  At this time, I want to find  out if Madhvi's suggestion would work.

    Hi Madhvi,

    To answer your question in the above post, I got lots of the same errors output with the debug build but I do not see any other problem.  I created new folder at the root and copied files to it.  Everything remains across power cycles.  I just tried to see if could save the touch screen calibration data but calibration is still required after each power cycle.  Would you please show me what I need to do next to persist the touch screen calibration data?

    Thanks,

    Luan