Thanks for the reply, Jeane. I am pretty sure that I am setting things up properly. There doesn't appear to be too much to this. It looks like there are just a couple of registers to set up (SCI1BDH, SCI1BDL, SCI1C2).
I threw together another, simple program to try to do this (see below). What I found was that I was receiving characters, but they were incorrect if I calculate the baud rate with an 8MHz bus clock (16MHz system clock). When I calculate with a 4MHz bus clock, the correct characters are received (when looking at them with the debugger). I know that I had read, someplace, that the bus clock was 1/2 the system clock, and that the PAN802154HAR was compatible with the SARD (with has an 8MHz bus clock). However, even though I can receive, I am still unable to transmit anything. It appears to write the data to the SCI1D register, but nothing is coming out on the terminal.
Baud Rate = 6 = 4000000/(38400 * 16)
I tried this at different BPS with the same results.
Thanks,
Jeff
Here is the entire test program that is just supposed to echo a character:
#include /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
void
main(void)
{
volatile unsigned char tmp;
EnableInterrupts; /* enable interrupts */
/* include your code here */
SCI1BDH = 0;
SCI1BDL = 6; //38400 @ 4MHz bus clock
SCI1C1 = 0;
SCI1C2 = 0b00001100;
for(;
{
if (SCI1S1_RDRF)
{
tmp = SCI1D;
while(!SCI1S1_TC);
SCI1D = tmp;
}
__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
/* please make sure that you never leave main */
} // end func--main()