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.

DLP5500: Transfer and replace single image,

Part Number: DLP5500
Other Parts Discussed in Thread: DLPC200

Hi,

In our DLP5500 based application, we are trying to display only a part of image.
We are using "DLP_FlashProgram_ProgramParallelFlash" to transfer and replace single image
as mentioned in the DLP LightCommander API manual,but we are not able to get it working.

Image resolution is 1024 x 768.

We are able to replace first image data by changing the header size.
For the second image the status seems OK but the actual data is not changed.
for the consecutive next images the status is not OK.And we get error when we access
immediately after replacing the image.

Below is the procedure we have imeplemented and its result.

1.With "DLP_FlashProgram_ProgramParallelFlash" nSkipBytesInFlash=0
register the *.lcp.bin file (126,058,496 bytes)
(Header size;262144 , Size of single Image:1048576, 120 images)
-> Status OK

2.Get each image with "DLP_FlashProgram_ReadParallelFlashToFile"
-> Status OK

3.With "DLP_FlashProgram_ProgramParallelFlash" SkipBytesInFlash=262144
Register only Size of single Image:1048576
-> Status OK

4.With "DLP_FlashProgram_ProgramParallelFlash" nSkipBytesInFlash=262144+1048576
Register only Size of single Image:1048576
->Status Not OK
The fuction returns 0(OK) but there is no change in the image in
"DLP_FlashProgram_ReadParallelFlashToFile"

5.Repeating "DLP_FlashProgram_ProgramParallelFlash" will return "1".

Please let me know if there is any suggestions on this issue and
if there is any sample code that we could refer.

Best Regards
paddu

  • Hello Paddu,

    We need to know a couple of things before providing some insight to your issue.

    What version of the MCU are you running?  This should be available in the about box if you are running the original LightCommander GUI.  If not then you can use the DLP_Status_GetMCUversionString command.

    Also, are you attempting to update 1-bit patterns or 8-bit patterns in the memory?

    Fizix

  • Hi Fizix,

    Thank you very much.

    Below is the detail.

    Version of the MCU: GetMcuVersion = 2.2.0.
    And we are attempting to update 8-bit patterns.

    Best Regards
    paddu
  • Hello Paddu,

    First try version 2.3.0 of the MCU which is the current version posted on the web.

    EDITED:  The location of each bitplane is mapped out in your <Solution Name>.lcp.xml file under the "LightCommander Control\<Solution Name>\Flash" if you are using the original LogicPD GUI.

    I am not certain where you are getting the length to write for a single image.  Each bitplane is exactly 98304 so that an 8-bit image is 8*98304 = 786432.  You will need to concatenate the information from the first 8 bitplanes of the new image.  You can do this by building a *.bin file with a solution with the new 8-bit image and extracting the bitstream from the <Solution Name>.lcp.bin file starting at 262144 for a length of 786432.  Then call the write to Parallel Flash starting at offset 262144 for a length of 786432 that you extracted from the bin file.
    You are using the start address of the 7th bitplane of image 1 ( 1048576 ) as a length, and that is incorrect.  Nor can you simply grab the first 1048576 bits of the <Solution Name>.lcp.bin file as the 1st 8-bit information data.  You must follow the method above or build your own bitplane data and concatenate the data.
    Fizix
  • Please note that I edited the answer above. You do NOT have to write each bitplane one at a time, but you must write to the correct location with the correct information.
  • Hi Fizix,

    Thank you so much for the detailed information.
    And I am sorry for the delay in response.

    Actually, we are trying your suggestions, we tried with the code shown below,
    for the first image the "DLP_FlashProgram_ProgramParallelFlash" returns "0"(OK) immediately
    but for the second it returns "1"(Not OK) after 20 seconds, and then it returns "1" every time.

    const int HeaderSize = 262144;	 	// 0x40000(Header size of .lcp.bin file)
    const int BlockSize = 131072;	 	// Maximum size of single block 
    const int OneBlockSize = 98304;	 	// Single block of single pattern image (8 blocks data) 98304  = 1024*768 / 8
    
    // Buffer's OneBlockSize is 8
    // number is image number
    
    foreach (var bitplane in buffer.Select((Value, Index) => new { Value, Index }))
    {
        uint skipSize = (uint)(HeaderSize + BlockSize * bitplane.Index + number * BlockSize * 8);
        result = DLP_FlashProgram_ProgramParallelFlash(skipSize, bitplane.Value, OneBlockSize, ProgressCallBack, 0, ref crcOut);
    
        if (result != 0)
        {
            return result;
        }
    }

    Please let me know if there is any advice about why it is returning "1".

    Best Regards
    paddu

  • Hi Fizix,

    Please let me know if there is any suggestions on the above issue.

    Best Regards
    paddu
  • Hello Paddu,

    We will look further into this and let you know if we discover anything that might be causing this issue.  We will get back to you by Wednesday evening to let you know one way or the other.

    Fizix

  • Hi Fizix,

    Thank you for looking into this issue.
    Please let me know if there are any updates.

    Best Regards
    paddu
  • Hello Paddu,

    Sorry for the delay.   Often when a 1 is returned something has caused the communications to fail.  Once failed, the only way to recover is to re-initialize the DLPC200 controller.  After communications is broken, it will ignore any further command and always return an error.

    In your firmware solution created with the GUI you should have a directory under LightCommander Control\<ProjectName>

    Under <ProjectName>\ look for a directory called Falash that contains two files <ProjectName>.lcp.bin (this is the Flash Image) and <ProjectName>.lcp.xml which is the memory map of the bin file.  Look for the first instance of:

    <Record>
        <Type>BitPlane</Type>
        <StartAddress>262144</StartAddress>  This number may be different in your file
        <Length>98304</Length>
    </Record>

    This marks the start address and length of the first bitplane of the image you are attempting to replace.

    The next entry is for the second bitplane.  For each 8-bit image you will need to replace the data in all 8 bitplanes to properly see the change.

    This bitplane data must be constructed as a continuous string of binary values 98304 bits in length.

    Also notice that the starting addresses are 131072 apart (not 98304 apart).

    This means that if you have 12 8 bit images you wish to replace you will have to write 8*12 = 96 binary patterns.

    Let me know if this helps.

    Also, please download the latest SPI & USB command guides since they were significantly updated.

    DLPC200 SPI Slave Interface (Rev. C) and DLP LightCommander API Reference Manual (Rev. C) [USB]

    Fizix

  • Please see updated links in previous post.
  • Hi Fizix,

    Thank you very much for the information.
    We are trying all the suggestions you have mentioned but unfortunately couldn't solve the issue.
    We don't understand why we get 1 for the second image even though the procedure is the same.

    With regards to re-initializing the DLPC200 controller, please let me know if there is any
    procedure to re-initialize the controller, as you mentioned it will ignore any further command,
    so will it be possible to re-initialize through software?

    We tried to unload and load PortabilityLayer.dll and use InitPortabilityLayer but it didn't work.

    lcp.xml is as below, so believe it is properly replaced through the test program,
    do you see any issue here? As per your suggestion, we shall go through the latest documents.

        <Record>
         <Type>BitPlane</Type>
          <StartAddress>262144</StartAddress>
          <Length>98304</Length>
        </Record>
        <Record>
          <Type>BitPlane</Type>
          <StartAddress>393216</StartAddress>
          <Length>98304</Length>
        </Record>

    I am sorry to bother you with many questions, appreciate your continued support.

    Best Regards
    paddu

  • Hi Fizix,

    Please let me know if there is any suggestion on this.

    Best Regards
    paddu