STM32L071 UART2 (PA2,PA3) not working

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
ALLSPARK
Posts: 2
Joined: Fri Mar 27, 2020 1:24 pm

STM32L071 UART2 (PA2,PA3) not working

Post by ALLSPARK »

I am trying to create Serial bridge from UART 2(PA2,PA3) to USART1 (PA9,PA10). Any idea how to declare USART2??

I am using STcore=>Discovery L072CZ and Nucleo-64 L073 . i have tested Blink program and UART1, they work fine ! declaring the UART2 is problematic for me. For pin compatibility with F103 and my PCB i need to make the USART2 work!

Code: Select all

// thing i have tried 
 
 HardwareSerial SerialLora(D0, D1);// when  discovery  was selected.

HardwareSerial Serial2(USART2); // when Nucleo was selected

User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32L071 UART2 (PA2,PA3) not working

Post by fpiSTM »

L072 is not L071.
So probably something different which prevent it to work properly.
For example the RCC_OSCILLATORTYPE_HSI48 does not exist on the L071 and it is configured during the system clock config of the Disco L072.
You create properly a variant for the L071.
Post Reply

Return to “General discussion”