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.

UCD3138 can not download firmware

Hi,I clicked "write boot checksum" when downloaded the firmware .Now I can not enter the ROM mode and download firmware any more.The EMV board can connet GUI .I do not know how to deal with thi situation.

  • Selecting write boot checksum can be dangerous when developing code.  For code security, the checksum has to be capable of locking up the device.  Normally, all our EVM codes come with a PMBus based "backdoor" that can be used to clear the checksum.  to use this, typically, you click on Device ID on the Device GUI, right next to where it says "Scan for Device in Program Mode". Then the "Command Program to jump to ROM (SendByte 0xD9) " will be highlighted.  If the PMBus and the backdoor are still working, clicking on that should clear the checksum. 

    However if you have modified the code, it is possible that the PMBus or the backdoor might not be working.  In that case, of course, the PMBus backdoor will not work either.  On some of our EVMs, we have a second hardware based backdoor that is close to the beginning of the code.  This one is harder to mess up.  For example, on some LLC codes, we have this:

    //Check to see if FAULT2 is pulled high and FAULT0 is pulled low.
     //If they are go to ROM.
         if (MiscAnalogRegs.GLBIOREAD.bit.FAULT2_IO_READ &&

    !   MiscAnalogRegs.GLBIOREAD.bit.FAULT3_IO_READ)
     {
      rom_back_door();
     }

    If you have an LLC code which has this in it and the back door still works, you can pull down the Fault 0 pin and pull up the fault 2 pin, and push reset.  That should clear the checksum. 

    I'm not aware of backdoors in the other EVMs, but they might be there. 

    To be safe, always verify that checksum clearing works before writing the checksum. 

    To verify the checksum clearing, first download the latest version of the code without writing the checksum. 

    Use whatever backdoor you want to check, whether it's the hardware one or the PMBus one or whatever. 

    Then read from the checksum location.  It should be zero.  You can use the Dump function in the checksum menu on the Device GUI to see the checksum value. 

    Then you should be safe to write the checksum. 

    If you make any change to the code, no matter how small, or where the change is, you should recheck. 

    Any infinite loop, or getting stuck in an interrupt, or any number of other things can mess up the backdoor.

    Happy Debugging,

    Ian Bower

  • Ian Bower,

    Hi,I did not change the code when i download the firmware.The code include blow :

     if(GioRegs.FAULTIN.bit.FLT2_IN==1)

       {
           clear_integrity_world();
        }
     
      ...
     
      for(;;)
      {
          ...
          pmbus_handler();
      }
     
    When I click "Command Program to jump to ROM (SendByte 0xD9) ",it shows no respond.When I pull up the fault2 pin ,the GUI can not connect the board until I reset it by power.But nothing change after doing these.
  • What code and what board  and what chip are you using? 

    When you pull fault 2 up, you need to reset while fault 2 is pulled up.  That should trigger the backdoor - Have you tried that?  Just pulling fault 2 up while the code is running won't do anything. 

    After you reset the part with fault 2 pulled up, you should be able to scan for device in ROM mode and find it with the device GUI. 

    Ian