2 Replies Latest reply on May 20, 2015 12:09 AM by m.wolcendorf

    Generating break sequence on puart.

      Hi Everyone,

       

      I need to generate the break sequence (more than 13 continuous zeroes) on the puart. There is not function for that in the API, and maybe I am missing something, but there is no other way to access the puart than through the API. Or is there?

       

      Now - I have tried to simulate a break by lowering the puart speed to 70% and sending 0 (with the puart_synchronousWrite), and then changing the speed back. But this does not really work - the zero and the next sent byte are somehow merged together.

       

      Is there a way to either force the puart to generate a break, or to wait for the character to be sent before changing puart parameters? Interrupt is the only thing I can think of, but is there anything else?

       

      BR,

       

      M.W.

       

      PS. I'm using the BCM920737TAG-03.

        • 1. Re: Generating break sequence on puart.
          VikramR_26

          By my knowledge there is no api to generate a break sequence. Yes only way to access PUART is through the api.

           

          I would suggest to use interrupt and reinitialize the PUART.

           

          hth

          vik86

          • 2. Re: Generating break sequence on puart.

            I have tried waiting for the empty fifo, I have tried using sync. write. The only way to get it to run was to introduce a delay loop. I am no too happy with this solution.

             

            I am not at all sure the interrupt scheme would work, as it would have to issue an interrupt after stop bit has ended. This sounds highly unlikely, as this is not the purpose of tx interrupt - this should happen latest just after the byte has been put into shift register, so about the start bit.

             

            OK, I could also probably use a timer, but then again - since there is no way to set it to a specific timeout value I would have to set the precision timer to very high frequency, and then the overhead would be substantial.

             

             

            So - I have a working solution, but it is Completely Redundant Anti-Pattern.

            Any good solutions?

             

            M.W.