cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo STM32L432KC - Issue using PB4 as I2C3

Hi All,

I am looking to use the I2C3 for connecting to an OLED display. I have already used I2C1, and due to design requirements, I cannot use the same bus to communicate to the OLED display, and hence I2C3 is my only option. I2C3_SDA is an alternate function of PB4, however this pin is primarily used for NJTRST. The datasheet specifies that "After reset, these pins are configured as JTAG/SW debug alternate functions, and the internal pull-up on
PA15, PA13, PB4 pins and the internal pull-down on PA14 pin are activated."

sebastianjadoenathmisier_0-1698409620482.png

I am using the STM32CubeIDE for flashing the device. The conflict between NJTRST and I2C3 however, seems to be causing issues. 
I have seen this issue being resolved using commands for the STM32F1 series, however these commands cannot be used for remapping of pins on the STM32L432KC series. 

I have already set this pin at I2C3_SDA in the IOC. I have probed PB4 and the SCL Line and seem to get correct waveforms, however for reassurance of correct functionality, I would like to remove NJTRST.

How do I pin map PB4 so that NJTRST is no longer used?

Many thanks

2 REPLIES 2
TDK
Guru

Mapping it to I2C3_SDA will stop it from acting as the NJTRST pin. The pin is set to AF0 on reset and changing that to AF4 will do this. There is no way to change the mapping it has immediately after reset.

TDK_0-1698414695303.png

 

If you feel a post has answered your question, please click "Accept as Solution".

Hi TDK,

Thank you very much for your reply 🙂