|
I use EXAR's XR16V554D to expand AT91SAM9261's uart, system is wince6.0. Now the performance is: it can send out successfully, but it receive chars alwasy with wrong chars. For examples: when pc send out: aaabbbcccdddeeefffggghhh it receive: aaabbbcccdddeeefffggghhhcccccccccccccccccccccccccccccccccccccccccc(c's count is different, sometimes several, sometimes some tens of. ) or aaabbbcccdddeeefaaaaaaaaaaaaaaaaaaaaaaffggghhhccccccccccccccccc ......
PC send out: 1112222wwww4444555556666 it receive: 1112222wwww4444555556666wwwwwwwwwwwwwwwwwwww or 1112222wwww44446666666666666555556666 ......
Someone said it is because of 9261's smc timing setup is wrong for 16C554, but I changed it many times, the result is same, can not receive correctly.
Here is one of my setting for 16c554, (I tried deifferent setting, i did not define TDF, for I don't know where TDF is used.) AT91SAM926x_SetChipSelectTimingIn_ns( pSMC, // pSMC 0, // Chip Select GetMasterClock(FALSE), AT91C_DM9000_NWE_SETUP, // dwNWE_SETUP AT91C_DM9000_NCS_WR_SETUP,// dwNCS_WR_SETUP 0, // dwNRD_SETUP 20, // dwNCS_RD_SETUP AT91C_DM9000_NWE_PULSE, // dwNWE_PULSE AT91C_DM9000_NCS_WR_PULSE, // dwNCS_WR_PULSE 140, // dwNRD_PULSE 100, // dwNCS_RD_PULSE 160, // dwNRD_CYCLE AT91C_DM9000_NWE_CYCLE );// dwNWE_CYCLE
please help me.
thanks!
|