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.

DLPC3478: Firmware update method using DLPC API

Part Number: DLPC3478
Other Parts Discussed in Thread: DLPC3479

Hi, team

I wonder if it is possible to update FW (.img) using the DLPC API.

I tried using the sample code, but It doesn't work well.

I am trying using the code below. Is this the right way?

If not, please tell me how I can update FW using API.

DLP FW Version : 9.0.1

API Version        : 1.10

  • Hello Yongjin,

    Please allow me some time to get back to you in regards to this.

    Best,

    Maximus

  • Hi Yongjin,

    Some questions:

    • Have you made sure the file you are calling is properly linked to your application? i.e. do you see the error warning printed out?
    • How are you calling the loadfirmware() function? 
    • When you call the loadfirmware() function how does your system react/behave?
      • Do you notice Host_IRQ go high? 
      • Does the projected image go away?
      • Are you able to communicate with the DLPC over I2C after it is done?

    Best,

    Maximus

  • Hello.
    No error occurs during the process of calling loadfirmware().

    loadfirmware() is called from the main() function in dlpc347x_samples.c (see picture below).

    When uploading F/W, PROJ_ON is kept at LOW, and if loadfirmware() is executed in that state,
    Host_IRQ remains high.

    After that, if you boot with PROJ_ON set to high,
    The projected image remains the same and I2C works normally. That is, there is no change.
    This is the result of console output by adding pirntf to the code as shown below.

  • Hi Yongjin,

    Thanks for providing this information. It seems from what you are showing the firmware is updated, can you explain what issues you are having with this? What firmware changes are there in the file you updated? 

    Best,

    Maximus

  • Hello.
    From the above, it looks like FW has been updated normally, but in reality, nothing happens.
    (Updated without FW.)
    Updated files are files with no changes.

    As a result of additional testing, we confirmed that all communication is done through I2C in the DLPC API Sample code.
    As far as I know, SPI communication must be used to update the entire firmware.
    There is no content for SPI communication in the sample code.
    Is there any sample code that updates the entire firmware through SPI communication?

    This is the result of additional testing.
    Firmware update using sample code was successful.
    DLPC34XX_WriteFlashDataTypeSelect(DLPC34XX_FDTS_ENTIRE_FLASH_NO_OEM);
    After modifying the code above, the firmware was updated normally.

    however,
    In the initial state without firmware, I2C communication will not be possible, and in this case, firmware update using the above method will not be possible.
    Therefore, as in the question above, a method to update the firmware directly through SPI communication is needed.

  • Hi Yongjin,

    The updating via I2C is in case you would like to update firmware later on, any initial firmware programming will need to be a pre programming of the spi flash over spi. This is not supported by the DLPC API as it cannot do the initial programming of the SPI flash. Only once there is a base firmware stored in the spi flash can the DLPC boot properly and then be used via I2C to further update the flash. 

    You mention the firmware updates but you do not see any changes, what firmware did you start with and what firmware did you test flashing?

    Best,

    Maximus

  • Hello.

    1. I just want to know how to update firmware with SPI without GUI.

    2. When updating the firmware in your GUI program, don’t you update it using SPI communication?
    I want to know how to do that.
    This is because, whenever my product needs a firmware update, I cannot update it by running the DLP GUI.
    This is because this is a very bad method from a product management perspective.
    Also, if the FW is terminated abnormally during the FW update, the FW is erased, so it is impossible to update using I2C.


    3. When updating firmware in your GUI program, don't you use Cypress's SPI library?

    4. And the firmware update was done with the basic firmware provided by you.
    "You mention the firmware updates but you do not see any changes, what firmware did you start with and what firmware did you test flashing?" I wish I would stop mentioning things like this anymore.
    The update using I2C communication with your API has already been successful.

  • Hello Yongjin,

    1. Assuming this is a new custom PCB, the first time the system is flashed it must be via spi using some SOIC clip or other system please see this guide on how to flash DLP firmware when I2C/USB connection is not possible (link). Any subsequent time you would like to update the flash You may use the I2C commands detailed in the DLPC3479 Software programmer's guide(link).

    2.The GUI does not directly use SPI to update the flash, the GUI sends the I2C commands described in the software programmer's guide via the Cypress USB chip. The DLP system needs to be able to fully boot up in order to have I2C functionality which is why a base firmware needs to be initially installed first. 

    3.Please see above answers

    4.I'm glad you were able to confirm the update via I2C is successful using our API. Please let me know what questions you have outstanding.

    Best,

    Maximus

  • Hello Maximus

    1.

    It is true that it is a custom PCB, but if you use the DLP GUI, the firmware is loaded normally even when the flash is empty. (I have been using it like this for 2 years. I have also used DLP for quite a long time, so I decline to give a basic answer.) I measured the flash pin with an oscilloscope during the process of uploading FW to the DLP GUI while the flash was empty, and I could see data being input and output.Looking at these results, I don't think SOIC clips are needed.

    2.

    As mentioned above, when uploading FW to an empty flash memory with GUI, I2C does not measure any waveform, but SPI waveform continues to be input and output. Still, can you say that GUI flash updates don't use SPI directly? can not understand.

  • Hello Yongjin,

    Please allow us some time to address your most recent points. We are returning from US holiday and our responses are delayed.

    Best,

    Maxine

  • Hi Yongjin,

    Thanks for pointing this out, I just looked further into this with my colleagues and you are correct. The GUI does indeed flash using SPI via the Cypress chip. This actually allows you to update an empty or corrupted flash, in this case when the GUI wants to update the flash proj on is set low, and the cypress SPI buffer is enabled. Then the cypress chip is able to update the flash. 


    With this in mind, can you restate what issue you are currently facing now that we are on the same page? 

    Best,

    Maximus

  • Hi Yongjin,

    Do you need any further assistance with this? If not I will close the thread out, feel free to re open by replying or starting a new one. 

    Best,

    Maximus