MATLAB Answers

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

7 views (last 30 days)
Kirankumar on 22 Nov 2013
Commented: 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' */
GpioCtrlRegs.GPAPUD.all = 0U;
GpioCtrlRegs.GPAMUX1.all &= 4294918143U;
GpioCtrlRegs.GPADIR.all &= 4294967167U;
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 */
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
I hope there should be some work around to enable/disable the pull-up for the GPIO.
  1 Comment
Fabian Tutschka
Fabian Tutschka on 20 Mar 2017
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:

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!