5 Replies Latest reply on Sep 20, 2012 9:16 AM by DaKn_263916


       how to use api change Uart’s Baud rate, stop bits, date bits

        • 1. Re: Uart

          If you look at the datasheet there is a discussion of the control register to


          set UART parameters. Also same is true of clock input for UART, when


          you assign a clock to be fed to the UART clock pin it has API calls in datasheet


          to set frequency, hence baud rate of UART.




          Regards, Dana.

          • 2. Re: Uart

             In my opinion, I can use the external clock and change the divider of the clock that I can change the baud rate of the uart


            but  i don't know change like this will be stabled.


            another problem there are know way  that  i  can change the stop bits and data bits from  api(from datasheet).


            so can  you tell me what I say is right or not.

            • 3. Re: Uart

               there  are  no way that  i know can  change the stop  bits and data bits using  the api (from the datasheet )

              • 4. Re: Uart

                Somebody else got stuck at the very same point, look here http://www.psocdeveloper.com/forums/viewtopic.php?f=42&t=8612&p=38998&hilit=uart+baudrate+change#p38998.


                When you file a technical case, will you please inform us here about the results?





                • 5. Re: Uart



                  I write like this but it doesn't work like what I want.


                  and the same question:






                  *    Initial Parameter Constants






                  #define UART_1_TXBUFFERSIZE           (100u)


                  #define UART_1_RXBUFFERSIZE           (100u)


                  /* UART shifts max 8 bits, Mark/Space functionality working if 9 selected */


                  #define UART_1_NUMBER_OF_DATA_BITS    ((8u > 8u) ? 8u : 8u)


                  #define UART_1_NUMBER_OF_STOP_BITS    (1u)


                  I don't know how to change above parameters.


                  and  thanks for your  reply

                  • 6. Re: Uart

                    How do you know new settings did not take effect ? Scope pictures ?


                    Or are you relying on the other end of the link to have auto-negotiated


                    the new settings ?




                    Also a quick check of the defines, look at their bit settings and match up


                    tech ref manual register bit settings for the UART control registers, to see


                    if there is no error in either defines or manual.....




                    Regards, Dana.