hello, with Com1 there isn't any problem. with Com2 there is a problem.
SERIAL_PARAM Com1Cfg; BYTE res ; Com1Cfg.Port = G_COM1; Com1Cfg.Speed = 38400; Com1Cfg.CharSize = 8; Com1Cfg.Parity = FALSE; Com1Cfg.Cwt= 0xFF; Com1Cfg.Bwt = 0xFF ; res = SerialOpen(&Com1Cfg, &ucPortId); read( .... .... write(.... .....
"can you resolve me this problem" Not without your target, and a full copy of all your soure code! You will need to adopt standard debugging techniques to narrow down the problem! Is data getting into the UART's Tx/Rx buffer? Are the interrupts working? Are all the definitions correct? Have you tried stepping through your functions to look for the difference between COM1 and COM2