How do you enable pull up on the GPIO pins for I2C communication when running the Concerto in C28x mode?
-Kenton
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.
How do you enable pull up on the GPIO pins for I2C communication when running the Concerto in C28x mode?
-Kenton
This document makes no reference on how to configure the GPIO pins. I was able to communicate with an I2C device with a Piccolo Control card using the following GPIO configure;
GpioCtrlRegs.GPBPUD.bit.GPIO32 = 0; // Enable pull-up for GPIO32 (SDAA)
GpioCtrlRegs.GPBPUD.bit.GPIO33 = 0; // Enable pull-up for GPIO33 (SCLA)
GpioCtrlRegs.GPBQSEL1.bit.GPIO32 = 3; // Asynch input GPIO32 (SDAA)
GpioCtrlRegs.GPBQSEL1.bit.GPIO33 = 3; // Asynch input GPIO33 (SCLA)
GpioCtrlRegs.GPBMUX1.bit.GPIO32 = 1; // Configure GPIO32 for SDAA operation
GpioCtrlRegs.GPBMUX1.bit.GPIO33 = 1; // Configure GPIO33 for SCLA operation
There is no GPxPUD (Enable pull-up) register for the SDA and SCL on the Concerto controller. How do you then, configure the GPIO on the Concertro in C28x mode?
Hi,
GpioCtrlRegs.GPBPUD.bit.GPIO32 = 0; // Enable pull-up for GPIO32 (SDAA)
GpioCtrlRegs.GPBPUD.bit.GPIO33 = 0; // Enable pull-up for GPIO33 (SCLA)
is enough. Yes configuring GPIO is enough.
Regards,
Gautam
Hi,
Correct me if I'm wrong, but default all PULL-ups are enabled on reset. So you have to disable them by code at initialization. Except for PWM outputs, I believe these are disabled by default.
I2C needs stronger pull-up (1.2K) than the port have, see I2C bus specifications http://www.nxp.com/documents/user_manual/UM10204.pdf.
Normally IO have an internal pull up of ~100K.
Best regards,
Tjarco
Hi Guys!
This is a quote from F28M35 TRM (page 369):
3. Enable or disable internal pull-up resistors:
To enable or disable the internal pullup resistors, write to the respective bits in the GPIO pullup disable
(GPIOPUR) register. This register is located in the M3 GPIO register space. All GPIO-capable pins
have the pullup disabled by default. The AIOx pins do not have internal pull-up resistors.
Regards,
Igor
Hi Igor,
Wow you corrected me ;)
I thought this was part of C28:
The internal pullups on the pins that can be configured as ePWM outputs(GPIO0-GPIO11) are all disabled asynchronously when the external reset signal ( XRS) is low. The internal pullups on all other pins are enabled on reset. When coming out of reset, the pullups remain in their default state until you enable or disable them selectively in software by writing to this register.
But it's part of M3.. Bit confusing :/
Thanks for the correction Igor!
Tjarco
After doing so more investigating it appears the I2C can only be accessed via the M3 cortex. I now have it working. Thanks everyone for the feedback and help.
Igor,
Im confused. The Concerto Workshop document claims its only accessible by M3 (p.58) 1016.F28M35x_Workshop_2-0.pdf
Any light shed on the matter would be appreciated.
-Kenton
Hi Kenton!
You can be sure at this more if you will refer to the TRM (p. 1154 (I2C of C28x) & 1583 (I2C of M3)) 4401.TI_F28M35x_manual.pdf
Regards,
Igor