+ Post New Thread
Results 1 to 18 of 18
  1. #1
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Do you know how to use USART on STM32?

    Helo friends,

    I've been doing USART on STM32 and got this at putty:
    Click image for larger version. 

Name:	USART.jpg 
Views:	28 
Size:	91.4 KB 
ID:	72713

    Actually I want to display :

    Code:
    printf("*  Thank you for using the board");
    Do you have idea why ?

    Thanks

  2. #2
    Full Member level 6
    Points: 2,878, Level: 12

    Join Date
    Nov 2009
    Location
    Sao Paulo, Brazil
    Posts
    390
    Helped
    37 / 37
    Points
    2,878
    Level
    12

    Re: Do you know how to use USART on STM32?

    I have used STM32 on several projects but never used the printf function. I have made my own communication functions. You should try using the USART on a RAW mode for now, just sending a few chars to check the communication. The STM32 stdperiph Lib might help you on that.

    Cya



    •   Alt17th April 2012, 15:00

      advertising

        
       

  3. #3
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    Quote Originally Posted by Sink0 View Post
    I have used STM32 on several projects but never used the printf function. I have made my own communication functions. You should try using the USART on a RAW mode for now, just sending a few chars to check the communication. The STM32 stdperiph Lib might help you on that.

    Cya
    Do you have example on it ?



  4. #4
    Full Member level 4
    Points: 1,381, Level: 8
    mgate's Avatar
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    197
    Helped
    37 / 37
    Points
    1,381
    Level
    8



  5. #5
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    Thanks for the info mate...

    ---------- Post added at 00:42 ---------- Previous post was at 00:39 ----------

    Do I need max232 converter for it ? I think it's because I don't use Max232 ?



    •   Alt18th April 2012, 00:42

      advertising

        
       

  6. #6
    Full Member level 4
    Points: 1,381, Level: 8
    mgate's Avatar
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    197
    Helped
    37 / 37
    Points
    1,381
    Level
    8

    Re: Do you know how to use USART on STM32?

    you are using a 3.3V logic micro... you need a max3232, or a 3.3V logic ftdi, you can also make an auxiliary circuit with transistors to handle rs232 levels... but I would use one ftdi

    ______
    note... if you are using an development board, probably you already have built on board ftdi or max3232
    Last edited by mgate; 18th April 2012 at 00:51.



  7. #7
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    Quote Originally Posted by mgate View Post
    you are using a 3.3V logic micro... you need a max3232, or a 3.3V logic ftdi, you can also make an auxiliary circuit with transistors to handle rs232 levels... but I would use one ftdi

    ______
    note... if you are using an development board, probably you already have built on board ftdi or max3232
    do you have the auxilary circuit with transistor to handle rs232 level ?

    ---------- Post added at 01:48 ---------- Previous post was at 01:34 ----------

    there's PL2303HX onboard, but window7 can not use virtual COM Port from ST....do you have ideas ?
    or I will create my own converter and connect to PA9 and PA10 with MAX232

    ---------- Post added at 01:51 ---------- Previous post was at 01:48 ----------

    This device cannot start. (Code 10)



  8. #8
    Full Member level 4
    Points: 1,381, Level: 8
    mgate's Avatar
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    197
    Helped
    37 / 37
    Points
    1,381
    Level
    8

    Re: Do you know how to use USART on STM32?

    people with same problem found the solution...

    http://social.technet.microsoft.com/...b-1352515a4fe6


    basically you have a Chinese fake
    Warning Notice:
    It is recently confirmed that counterfeit (fake) PL-2303HX USB to Serial Controller ICs using Prolific's trademark logo and device drivers were being sold in the China market. Counterfeit IC products show exactly the same outside chip markings but generally are of poor quality and causes driver compatibility issues (Error Code 10). We issue this warning to all our customers and consumers to avoid confusion and false purchase.

    Please be warned that selling counterfeit products are illegal and punishable by civil and criminal courts according to the trademark, copyright, and intellectual properties laws and regulations. Prolific will take proper and severe actions to cease and confiscate these counterfeit products. Prolific also prohibits the distribution of any PL-2303 drivers (including download links) without written permission from Prolific.

    Prolific advices end-users to only purchase branded cable products with company name contact information for service and support in case you suspect a counterfeit chip inside. You may also contact Prolific to provide the vendor information.

    So you need to get old version drivers to solve it...

    ---------- Post added at 03:06 ---------- Previous post was at 02:11 ----------

    You will want to check this article:
    Last edited by mgate; 18th April 2012 at 02:42.



    •   Alt18th April 2012, 03:06

      advertising

        
       

  9. #9
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    It works ok with my module ( just created ) MAX232 chip is being used for the module..
    thanks for helping :)



  10. #10
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    I tested it on putty 115200 baud
    Click image for larger version. 

Name:	USART1.jpg 
Views:	13 
Size:	132.5 KB 
ID:	72741



  11. #11
    Full Member level 4
    Points: 1,381, Level: 8
    mgate's Avatar
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    197
    Helped
    37 / 37
    Points
    1,381
    Level
    8

    Re: Do you know how to use USART on STM32?

    have you tested with the PL2303HX ?



  12. #12
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    Quote Originally Posted by mgate View Post
    have you tested with the PL2303HX ?
    I'm using Profilic USB to Serial Converter then connect into my handmade MAX232 converter, then connect to PA9 and PA10...so far no problem...



    •   Alt18th April 2012, 03:56

      advertising

        
       

  13. #13
    Full Member level 4
    Points: 1,381, Level: 8
    mgate's Avatar
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    197
    Helped
    37 / 37
    Points
    1,381
    Level
    8

    Re: Do you know how to use USART on STM32?

    Sorry, I was asking if you had try to use directly the onboard PL2303HX as you said
    there's PL2303HX onboard, but window7 can not use virtual COM Port from ST....do you have ideas ?



  14. #14
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    Quote Originally Posted by mgate View Post
    Sorry, I was asking if you had try to use directly the onboard PL2303HX as you said
    For that one , I can not make the Virtual COM Port from STM to run in window7 64bits, may be there's a bug...



  15. #15
    Full Member level 4
    Points: 1,381, Level: 8
    mgate's Avatar
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    197
    Helped
    37 / 37
    Points
    1,381
    Level
    8

    Re: Do you know how to use USART on STM32?

    I posted the solution for that problem above ;)

    just follow the link and install the mentioned drivers as vista compatible under admin rights

    You will want to check this article:



  16. #16
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    I installed that driver already and my USB to serial converter is working now, but there is another chip on board that has a different preference with this USB converter, your answer is right for USB to serial converter but it's different with the 2303 onboard, I must use driver from ST, they call it ST Virtual COM port, and it's not working, actually it's for downloading my code...but now I'm using JLink for replacing it, doesn't matter, work the same..

    ---------- Post added at 04:27 ---------- Previous post was at 04:26 ----------

    Quote Originally Posted by mgate View Post
    I posted the solution for that problem above ;)

    just follow the link and install the mentioned drivers as vista compatible under admin rights
    Have you done your own customized uCGUI ?
    Where's the starting point for it ?

    Thanks



  17. #17
    Full Member level 4
    Points: 1,381, Level: 8
    mgate's Avatar
    Join Date
    Apr 2012
    Location
    Portugal
    Posts
    197
    Helped
    37 / 37
    Points
    1,381
    Level
    8

    Re: Do you know how to use USART on STM32?

    didn't know about that st issue
    Well, I've just added a few buttons... It is similar to windows API programing... anyway, I never managed to get the full free uCCOS, so I prefer to use freeRTOS



  18. #18
    Advanced Member level 4
    Points: 6,654, Level: 19
    Achievements:
    7 years registered

    Join Date
    Jun 2009
    Location
    California
    Posts
    1,296
    Helped
    22 / 22
    Points
    6,654
    Level
    19

    Re: Do you know how to use USART on STM32?

    USB to serial converter and the small MAX232 module that I had created just now
    Click image for larger version. 

Name:	RS232 and handmade module.jpg 
Views:	14 
Size:	161.6 KB 
ID:	72743



--[[ ]]--