4 Replies Latest reply on Jul 17, 2019 3:20 AM by MoTa_728816

    SW Tx UART

    FUHU_4360921

      Dear Sir,

       

      I would like to set "SW Tx Uart" to P0[1] Port, but the project show error " \UART:tx(0)\ has been fixed to PORT(1,5) by control file"? How can solve it?

       

      Here attach my project VFE_20190716_RTC.7z!

       

      Thanks!

      kwan

        • 1. Re: SW Tx UART
          MoTa_728816

          Hi,

           

          I've copied your project and tried to change the pin then I did clean and rebuild,

          it seems that I could build the project.

          000-WorkBench.JPG

          There was a notice

          001-Notice.JPG

          Would you test if it is built as you expected?

           

          moto

          • 2. Re: SW Tx UART
            FUHU_4360921

            Hi Moto,

             

            You can see the icon is Yellow, and I test "SW Tx UART" do not output! The Port should be GREEN box!

            Would you help to check it?

             

            Thanks!

            kwan

            • 3. Re: SW Tx UART
              MoTa_728816

              Dear Kwan-san,

               

              I'm sorry that my idea did not work.

              BTW, I think that yellow box should be acceptable, not as good as the green one though.

               

              Then I re-read the datasheet and found that we need to change

              the PinAssignmentMethod from Static to Dynamic.

              002-UART_Config.JPG

               

              Then call

              SW_Tx_Uart_StarEx(uint8 port, uint8 pin)

               

              So your case, it will be

              UART_StartEx(0, 1) ;

               

              As I don't have the board, could you test it?

               

              ... reading your source, I noticed that you have not called "UART_Start()",

              would you test

              (1) just add "UART_Start() ; " after CyGlobalIntEnable ; in my previous project?

              ==========

                  /* Enable global interrupts */

                  CyGlobalIntEnable;

                  UART_Start() ;

              =============

               

              (2) Or add UART_Start(0, 1)

              ==========

                  /* Enable global interrupts */

                  CyGlobalIntEnable;

                  UART_StartEx(0, 1) ;

              =============

               

              Best Regards,

              17-Jul-2019

              Motoo Tanakta

              1 of 1 people found this helpful
              • 4. Re: SW Tx UART
                MoTa_728816

                Dear Kwan-san,

                 

                So I made a couple of projects

                 

                (1) VFE_190717B_Static

                  Like my previous one, assign method is static, but still assign P0[1] at Pin config.

                  Calling "UART_Start() ; "

                 

                (2) VFE_190717C_Dynamic

                   Using Dynamic assign method, so there is no pin in the Pin config.

                   Call "UART_StartEx(0,1) ;"

                 

                Both could be built.

                And I'm hoping both work, probably (2) will be the better though.

                 

                Best Regards,

                17-Jul-2019

                Motoo Tanaka