I'm trying to set the baud rate on a CC1110 to 115200 but it always comes out at 57600. I am using a 27MHz crystal and have adjusted U1BAUD to 24 from the suggested 34 for a 26MHz crystal. I've also checked and the PARTNUM register reads back 0x01. Below is the code. I can make it go to 115200 by changing U1GCR to 13 but I don't know why the speed seems to be 1/2 of what I think it should be.
while ((U1CSR & U1CSR_ACTIVE) != 0) { } // Ensure we're not active when baud is changed
U1BAUD = 24; // BAUD will be set to 115,200 for now
U1GCR = 12;
U1UCR = U1UCR_STOP; // Single 'hi' stop bit
U1CSR = U1CSR_MODE | U1CSR_RE; // Enable UART1 as RS-232
for (i=0; i<=MRFI_MAX_FRAME_SIZE; i++)
txmsg.frame[i] = 0x00;
PKTLEN = txmsg.frame[0] = PACKET_LENGTH; // length
txmsg.frame[ 1] = flashDeviceAddr[ 0]; // My unique ID num
txmsg.frame[ 2] = flashDeviceAddr[ 1];
txmsg.frame[ 3] = flashDeviceAddr[ 2];
txmsg.frame[ 4] = flashDeviceAddr[ 3] | GATEWAY_FLAG;
U1DBUF = 0x55; // Dummy character just to get the RS-232 queue moving