MATLAB Answers

0

How to disable the GPIO pull-up for the TMS320F28335 processor using the embedded coder for Texas Instruments C2000 libraries

Asked by Kirankumar on 22 Nov 2013
Latest activity Commented on by Fabian Tutschka on 20 Mar 2017
am unable to disable the internal pull-up for the GPIO7 of the TMS320F28335 using embedded coder for Texas Instruments C2000 libraries(ver: Matlab2011a,CCS V3.3).
Below is the auto code generated for GPIO as an input configuration.
{
/* Start for S-Function (c280xgpio_di): '<S38>/Digital Input' */
EALLOW;
GpioCtrlRegs.GPAPUD.all = 0U;
GpioCtrlRegs.GPAMUX1.all &= 4294918143U;
GpioCtrlRegs.GPADIR.all &= 4294967167U;
EDIS;
}
all bits of GPAPUB register is assigned to zero(pull-up enable). But, for the CAN pins(GPIO30,31) , pull-ups are handled pin wise. refer below code for the CAN pins.
/* Configure CAN pins using GPIO regs */
EALLOW;
GpioCtrlRegs.GPAPUD.bit.GPIO30 = 0; // Enable pull-up for GPIO30 (CANRXA)
GpioCtrlRegs.GPAMUX2.bit.GPIO30 = 1; // Configure GPIO30 for CANRXA operation
GpioCtrlRegs.GPAPUD.bit.GPIO31 = 0; // Enable pull-up for GPIO31 (CANTXA)
GpioCtrlRegs.GPAMUX2.bit.GPIO31 = 1; // Configure GPIO31 for CANTXA operation
EDIS;
I hope there should be some work around to enable/disable the pull-up for the GPIO.
kirankumar.

  1 Comment

For TI Concerto F28M35x/F28M36Mx processors it is possible to disable GPIO Pull-Up. Please have a look at topic "GPIO# Pull Up Disabled" in the following link:
https://www.mathworks.com/help/releases/R2015b/supportpkg/texasinstrumentsc2000concerto/ug/coder-target-pane-texas-instruments-concerto-f28m3x-arm-cortex-m3.html?searchHighlight=gpio%23%20pull%20up

Sign in to comment.

0 Answers