2023-10-27 05:33 AM
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."
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
2023-10-27 06:52 AM - edited 2023-10-27 06:52 AM
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.
2023-11-06 01:27 AM
Hi TDK,
Thank you very much for your reply :)