Hello,
Are you using an internal clock source for your BUSCLK? and is it calibrated?
Baudrate misamtch is the most common cause of framing errors. The overrun could be becasue you are not handling the FE properly. Some code would be useful.
I don't know if I understood You correctly. In CPU component I set High Speed Box on internal clock and Internal Bus Clock at 16 MHz. I don't see in SCI component (nor in registers) possibility to change clock for this module.
This is how I handle interrupt errors:
void uart_com_OnError(void)
{
led_ctrl_ClrBit(0);
(void)SCI1S1;
(void)SCI1D;
}
That's all. Anything else I configured with PE components library I am beginner in this stuff, so please be understanding.
Sorry for doubling.
Mishup
Hello Lundin,
When I have previously used expressions like
SCI1S1;
CW does appear to generate the required code, at least with the default compiler options, possibly LDA SCI1S1. The void cast eliminates a compiler warning because the value is not assigned to a variable.
If it works, why make the code more complex by creating a dummy local variable? Why your variable need to be volatile escapes me - is this also to avoid a compiler warning message?
Regards,
Mac