How to enable the MCU's internal pullup/pulldown resistors at Embedded Coder Support Package for Texas Instruments C2000 Processors?
23 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Gabriel Pauka
il 5 Feb 2018
Commentato: Manikandan
il 2 Set 2024
Dear friends,
I am working in a prototype with the F28379D development board, with the Embedded Coder Support Package for Texas Instruments C2000 Processors tool, and enjoying it very much. But, I have a question. How can I enable the internal pullup/pulldown resistors at the MCU's GPIOs that are defined as Digital Inputs?
Thanks,
Gabriel
0 Commenti
Risposta accettata
Venkatesh Chilapur
il 14 Mag 2018
HI,
If you can try the following:
Please use the "System Initialize" block found under "Simulink coder->Custom Code" library blocks and add the following lines that will execute during the system Initialization.
Under "System Initialize Function Execution Code" section:
EALLOW; GpioCtrlRegs.GPAPUD.bit.GPIO16 = 0; /* To Enable the Pull - Up for GPIO16
EDIS;
The below extract is from controller manual:
(Optional) Enable internal pullup resistors "To enable or disable the pullup resistors, write to the appropriate bits in the GPIO pullup disable registers (GPyPUD). All pullups are disabled by default. pullups can be used to keep input pins in a known state when there is no external signal driving them"
Regards,
Venkatesh C
2 Commenti
Più risposte (1)
Venkatesh Chilapur
il 18 Mag 2018
Hi Gabriel,
There is no Pulldown circuit. You need to add an external one if required. If pullup is disabled, the pin would be floating. Please refer the following post from TI forum.
https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/569358/2087265#2087265
Regards,
Venkatesh C
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!