I2C SDAport.pin in out configuration

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
samcs
Level 1
Level 1
50 sign-ins 5 likes given 10 questions asked

Hi Ifx community,

I am reading the Tc3XX user manual. Since the SDA pin is an I/O pin, used for output, it should be configured as Alt(5).

I wonder if, for a write operation, it needs to be configured as O(5) first, and for a read operation, it needs to be configured as an input first.

in AURIX_TC3xx_Part1-UserManual-v02_00-EN.pdf  

14.2

If a peripheral unit uses a GPIO port line as a bi-directional I/O line, register Pn_IOCR has to be written for input or output selection. The Pn_IOCR register further controls the driver type of the output driver, and determines whether an internal weak pull-up, pull-down, or without input pull device is alternatively connected to the pin when used as an input. This offers additional advantages in an application

0 Likes
1 Solution
cwunder
Employee
Employee
100 solutions authored 5 likes given 50 likes received

Digital inputs are enabled by default (if there is an analog input on that pin they can be disabled). With I2C you should used the open drain selection for O(5).

cwunder_0-1681675010315.png

In your code you need to write the IOCRx register with your setting for the pin.

View solution in original post

0 Likes
1 Reply
cwunder
Employee
Employee
100 solutions authored 5 likes given 50 likes received

Digital inputs are enabled by default (if there is an analog input on that pin they can be disabled). With I2C you should used the open drain selection for O(5).

cwunder_0-1681675010315.png

In your code you need to write the IOCRx register with your setting for the pin.

0 Likes