Generating break sequence on puart.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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.

0 Likes
1 Solution
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

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

View solution in original post

0 Likes
2 Replies
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

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

0 Likes
Anonymous
Not applicable

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.

0 Likes