We had a similar problem. It turns out that the EzDSP boards that TI sent us
were older - and slower. We worked around the problem by doing this in the
scia_echoback_init() function:
// #if (CPU_FRQ_150MHZ)
// SciaRegs.SCIHBAUD =0x0001; // 9600 baud @LSPCLK = 37.5MHz.
// SciaRegs.SCILBAUD =0x00E7;
// #endif
// #if (CPU_FRQ_100MHZ)
SciaRegs.SCIHBAUD =0x0001; // 9600 baud @LSPCLK = 20MHz.
SciaRegs.SCILBAUD =0x0044;
// #endif
Hi. I am using TMS320F28335 starter kit by texas. I am having problem in running
of SCI(UART) code example given with software. As according to software example,
it is running at 115200 baud rate at 25Mhz clock. But when run the code and
check at hyperterminal(hyperterminal is working properly), I found wrong data at
the terminal. Also I have checked the code for different baud rates.According to
register setting in the code example,it is running at 37.5MHz and also i checked
for it by making appropriate changes but its not working. So please help me in
finding the solution of it. Thanks
>
>void main(void)
>{
> int status = 0;
>
> InitSysCtrl();
> DINT;
> InitPieCtrl();
> IER = 0x0000;
> IFR = 0x0000;
> InitPieVectTable();
> XINTF_Init();
> CSM_unlock();
> InitGpio();
> LED_Init();
>
> do
> {
> // Test:1
> if( RUN_TEST(TestFlags,0)) {
> SET_TEST_FLAG(TestRan,0);
> status |= TEST_execute( TEST_memory, "MEMORY TEST",1, 0);
> }
>
> // Test:2
> while(1)
> {
> if( RUN_TEST(TestFlags,1)) {
> SET_TEST_FLAG(TestRan,1);
> status |= TEST_execute( TEST_SciLoopBack, "SCI LOOPBACK",2, 1);
> }
> }
> // Test:3
> if( RUN_TEST(TestFlags,2)) {
> SET_TEST_FLAG(TestRan,2);
> status |= TEST_execute( TEST_CanLoopBack, "CAN LOOPBACK",3,2);
> }
>
> // Test:4
> if( RUN_TEST(TestFlags,3)) {
> SET_TEST_FLAG(TestRan,3);
> status |= TEST_execute( TEST_I2CLoopBack, "I2C LOOPBACK",4, 3);
> }
> }while(--TestCount > 0);
>
> asm (" ESTOP0");
>
>}
>int TEST_SciLoopBack(void)
>{
> Uint16 SendChar;
> volatile Uint16 ReceivedChar;
> Uint16 NotSendChar;
>
> int Loop;
> long Timeout;
> int Xrdy;
>
> scia_reset();
> scib_reset();
>
> scia_fifo_init(); // Initialize the SCI FIFO
> scib_fifo_init(); // Initialize the SCI FIFO
>
> scia_loopback_init(); // Initalize SCI for digital loop back
> scib_loopback_init(); // Initalize SCI for digital loop back
>
> SendChar = 0;
>
> for(Loop=0; Loop 0) && (!Xrdy) );
>
> if( Timeout 0) && (!Xrdy) );
>
> if( Timeout
You can post a message or access and search the archives of this group on
DSPRelated.com:
http://www.dsprelated.com/groups/c28x/1.php
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.
_____________________________________
About this discussion group:
Archives: http://www.dsprelated.com/groups/c28x/1.php
To Post: Send an email to c...
Other DSP Related Groups: http://www.dsprelated.com/groups.php