SNIU028D February 2016 – September 2020 UCD3138 , UCD3138064 , UCD3138064A , UCD3138128 , UCD3138A , UCD3138A64
Here is code which actually uses 2 I/O lines, used in the LLC EVM:
void main()
{
//Recommended setting
MiscAnalogRegs.CLKTRIM.bit.HFO_LN_FILTER_EN = 0;
//Turn on PMBus address pin current source ASAP to allow time to charge up.
PMBusRegs.PMBCTRL3.bit.IBIAS_B_EN = 1;
//Disable all DPWM outputs.
global_disable();
//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();
}
Notice that the code is placed very close to the start of the main function. Only time critical elements are placed before it. This code uses rom_back_door, which first disables all the DPWMs and then calls clear_integrity_word. In this case the function is the same as the previous example.