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.
Hello Willy,
If VCLK is 110MHz,
For 4800 baudrate: p=110*10^6/(16*4800)-1 = 1431
For 115200: p=110*10^6/(16*115200)-1 = 59
For 1200: p=110*10^6/(16*1200)-1 = 5728
TI has a code generation tool (HALCoGen) which can be used to generate lower level driver for TMS570/RMx devices. Here is the download side:
2061.HALCoGen04.05.02 selftest.zipHello QJ Wang
I used the version of HalCoGen is 4.05.02.
But when I want to use baud rate of 4800 and P value is set to 1431, I can only transfer data and cannot receive data.
And the attach file is my HalCoGen project file.
Hello QJ Wang
I do not receive anything for baud rate set 4800/2400/1200.
The code is as follows:
void sciSetBaudrate(sciBASE_t *sci, uint32 baud)
{
float64 vclk = 110.000 * 1000000.0;
uint32 f = ((sci->GCR1 & 2U) == 2U) ? 16U : 1U;
uint32 temp;
float64 temp2;
temp = (f*(baud));
temp2 = ((vclk)/((float64)temp))-1U;
temp2 = floor(temp2 + 0.5);
sci->BRS = (uint32)((uint32)temp2 & 0x00FFFFFFU);
}
And I try another method
void sciSetBaudrate(sciBASE_t *sci, uint32 baud)
{
/** - set baudrate */
scilinREG->BRS = 1431; /* pre-scale 1431 = 4800 pbs*/
}
But the same can't receive by baud rate set to 4800
thanks