I have been trying to understand how sci's baud rate declaration works. For starters, Yes, I went through TRM's SCI HBAUD registers and calculated accordingly. However, I dont understand the correation between launchapd, example code and the original values I obtained. Example:
For baud rate of 9600, we get BRR as 650 which in hex is supposed to be 0x81. However, in the example code- SCI_loopback, this value is 0x8B. What is causing this change? Also, according to TRM, Hbaud and Lbaud both have baud select registers in them but ony sciLBAUD uses it. What is deciding the HBAUD value to be 0x01 or 0x02? Where is lspclkdiv declared? is it 4 by default?
Also, please don't guide me to look into TRM. I have already done that a lot of times. I'm posting here because i'm not able to understand what is happening.