How to disable the GPIO pull-up for the TMS320F28335 processor using the embedded coder for Texas Instruments C2000 libraries
조회 수: 5 (최근 30일)
이전 댓글 표시
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
Fabian Tutschka
2017년 3월 20일
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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!