This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5342: USCI Auto-baud detection with IrDA?

Part Number: MSP430F5342


This project uses the USCI with IrDA and we would like to know if it is possible to use auto-baud detection in this mode.  I inconsistently see baud rate register divider (UCAxBR0) get updated, but the register gets updated to a value 1/2 of what we would expect.  A majority of the time, the baud rate is not changed.  In our implementation a 1 bit is high for the entire bit period, but a 0 bit is low for 1/2 a bit period, so it performs what I would call return to 1.  I wondering if this is causing an issue for the auto-baud detection.  Further, I never see the break bit (UCBR) get set.  Should we see this bit get set if the auto-baud detection is working correctly?

Question 1: Does auto-baud rate detection work with IrDA?

Question 2: If the answer to question 1 above is yes, is there something about our implementation that would indicate auto-baud detection won't work for us?

Thank you

  • Hey Chris,

    I'm not sure, but I think tradition IrDA mode would cause issues.  It sounds like your signal is structured slightly differently though, could you provide a diagram? 

    Automatic Baud-rate Detection is described in Section 36.3.4 of the MSP430F5342 Family User's guide.  I've captured it below.  

    Assuming you can generate the Break and Delimiter sequence to trigger the Auto Baud detection, the actual baud rate is measured from the Synch. It's measured from first and last falling edge, then I assume divided by 8 bits. 

    Because the IrDA signal is very different, I think this is going to cause issues.  It's also not specified if the "last edge" is detected due to being the 5th edge or its location relative to the stop bit.  Either way, I could see IrDA cause some issues here.       

    Regards,

    JD

  • JD,

    Thank you for your reply and the explanation.  Sorry, I didn't respond early.

    Our waveform is such that a 1 is high the entire bit period.  A zero is low for the first half of the bit period (more than half) and then transitions high for the remainder of the period.  The UART handles this bit timing correctly.  What I see that I never get the UCBR bit set probably due to the zero bits not being low all the time, but I do see the baud rate register get updated correctly.  We are able to drive the bits in the synch field correctly, so the waveform looks like that shown in the diagram.  The problem we see is that the the baud rate set by the auto baud detection features sets the baud rate 2x of the expected value, which we can work around.

    Are you suggesting that in our case, there is nothing more that we can do?  Is it possible or likely we will see variations on how this works from part-to-part?  I'm concerned given what you said above is that even though we were seeing positive results with one part (excluding the 2x baud rate), we may not see good results on all parts.  What are your thoughts on that?

    Best Regards,

    Chris

  • Hello Chris,

    Chris Gilbert51 said:
    I see that I never get the UCBR bit set probably due to the zero bits not being low all the time, but I do see the baud rate register get updated correctly.

    I still don't understand what your full signal looks like.  Are you receiving a correct break and delimiter before the synch?   Can you provide a diagram or capture of it?  

    I feel like if your UCBR bit is not being set, then your break sequence wasn't recognized.  If this isn't recognized, then I would not expect the auto-baud generator to work.  

    Chris Gilbert51 said:
    Are you suggesting that in our case, there is nothing more that we can do?  Is it possible or likely we will see variations on how this works from part-to-part?  I'm concerned given what you said above is that even though we were seeing positive results with one part (excluding the 2x baud rate), we may not see good results on all parts.  What are your thoughts on that?

    There are always small variations from device to device, but I don't think that matters here.  My concern would be that we don't understand why your UCBR is not being set and why your baud rate is 2x what you expect.  We have not isolated the cause so there is no way to predict the future behavior.  

    It seems that your input signal maybe causing some issues.  If this is the case, I would recommend not using the automatic baud rate detection.  

    Is manually setting your baud rate a possible solution? 

    Can we generate the input signal as expected, to test your firmware and the autobaud rate detection?  Maybe we could do this with a MSP430 Launchpad.     

    Thanks,

    JD

**Attention** This is a public forum