cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo stm32L152, serial4 and serial 5

antonioB
Associate II
Posted on December 02, 2015 at 13:51

Hi to all, I use mbed plattform.  i have this strange situation i write this code, i

&sharpinclude ''mbed.h''

 //Serial pc(PC_10,PC_11); //Serial 4  TX,  RX   ko

  Serial pc(PB_10,PB_11); //Serial 3  TX,  RX  //ok

 //Serial pc(PC_12,PD_2); //Serial 5  TX,  RX  //ko

 

 

DigitalOut myled(LED1);

 

int main() {

  int i = 1;

  pc.printf(''Hello World !\n'');

  while(1) {

      wait(1);

     pc.printf(''This program runs since %d seconds.\n'', i++);

      myled = !myled;

  }

}

if i use Serial 3 all work well, if i use serial 4 or serial 5 don't work, can you give me where is the error ?

can you help me?

best regards

A.

#nucleo_l152 #mbed
1 REPLY 1
Posted on December 03, 2015 at 03:41

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/mbed%20Serial%20on%20Nucleo%20UART4&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=127]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2Fmbed%20Serial%20on%20Nucleo%20UART4&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=127

The problem sounded familiar, as I recall Andrew pinned it down to the board support/descriptors.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..