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.

GPIO Troubles with UCD3138

Other Parts Discussed in Thread: UCD3138

Hi

try to use some Pins as GPIO.

// Rng 0 800mA FS

MiscAnalogRegs.GLBIOEN.bit.CONTROL_IO_EN = 1;

MiscAnalogRegs.GLBIOOE.bit.CONTROL_IO_OE = 1;

MiscAnalogRegs.GLBIOVAL.bit.CONTROL_IO_VALUE = 1;

MiscAnalogRegs.GLBIOVAL.bit.CONTROL_IO_VALUE = 0;

MiscAnalogRegs.GLBIOVAL.bit.CONTROL_IO_VALUE = 1;

MiscAnalogRegs.GLBIOVAL.bit.CONTROL_IO_VALUE = 0;

MiscAnalogRegs.GLBIOVAL.bit.CONTROL_IO_VALUE = 1;

 

// Rng 1 40mA FS

MiscAnalogRegs.GLBIOEN.bit.SYNC_IO_EN = 1;

MiscAnalogRegs.GLBIOOE.bit.SYNC_IO_OE = 1;

MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE = 1;

MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE = 0;

MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE = 1;

MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE = 0;

MiscAnalogRegs.GLBIOVAL.bit.SYNC_IO_VALUE = 1;

 

//Rng 2 2mA FS // works

MiscAnalogRegs.GLBIOEN.bit.FAULT2_IO_EN = 1; //Configure FAULT2 as GPIO

MiscAnalogRegs.GLBIOOE.bit.FAULT2_IO_OE = 1; // 1 = output, 0 = input

MiscAnalogRegs.GLBIOVAL.bit.FAULT2_IO_VALUE = 0;

 

FAULT2 pin works, CONTROL.pin Needs an external pullup as I read and SYNC? Dont see any pulse at the SYNC line

 

Thanks for helping.

 

With best regards

 

Gerhard

 

  • Hi,

    now I found one more problem. My Software runs fine on the eval board but fails on my board. Now I sorted out all differences and found:

    My nRun/Stop signal uses the FAULT1 pin as Input. The EVAL board uses a 64 pin UCD3138 and FAULT1 uses a pin exclusive. My board uses a 40 pin Version of the UCD3138 and here the FAULT1 pin is multiplexed with some other functions. In the Manual I found:

    4.21 I/O Mux Control
    In different packages of UCD3138 several I/O functions are multiplexed and routed toward a single
    physical pin. I/O Mux Control register may be used in order to choose a single specific functionality that is
    desired to be assigned to a physical device pin for your application.

    Ok, but I cant find any Register in the documentation with a function like this.

    As far as I can see now, my ~run/stop Signal didn't arrive and so my converter didn't start.

    Generally there is a Problem using Pins with more than one function, the documentation isn't very clear in that Point-

    With best regards

    Gerhard

  • Hi, Gerhard,

    you can use the below register to mux different I/O.  Regards,

    Sean