CW 5.1 (HC(S)08: serious problem with USB/RS232 converters

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

CW 5.1 (HC(S)08: serious problem with USB/RS232 converters

4,057 次查看
joerg
Contributor II
Since I have made a programmer for HC08 family it works just fine if it is connected to a real UART. But only if the FIFO is OFF! With this issue I can live with. But if the Laptop does not have a real COM interface or the PC-card does not supporting to switch off the FIFO the programming of some devices (i.e. QTx or QYx) is a nightmare. USB/RS232 converters are acting in a asynchronous way so the timing of the MON08 interface has to be modified!

Does anyone know who could be the right person to give this input for a real improvement of the case?

Thanks

Joerg
标签 (1)
标记 (1)
0 项奖励
回复
6 回复数

1,291 次查看
bigmac
Specialist III
Hello Joerg,
 
I seem to recall that there was some previous discussion on this subject - it could have been back in the Freegeek days.  Apparently some USB-to-serial devices are compatible, and others are not due to timing problems.  I think it was a respondent from Japan had done an evaluation of various adaptor leads, but I cannot remember the details.  My recollection is that some of the FDTI devices had problems.
 
It might be worthwhile trying other leads that use different devices thanwhat you are currently using.
 
Regards,
Mac
 

1,291 次查看
joerg
Contributor II

Thanks Alban and Bigmac
It is not the MCU side causing problems it is the PC side! And there some improvements have to be done. I tried FTDI and some other USB/RS232 converters and the result is more or less the same. Since the latency of the USB-Bus is at least 1 ms the emulation of the 16C550 UART is not perfect! The MON08 interface software is also not working with the FIFO switched ON (on all my PSs!) and for me this is a sign, that the comunication protocol is not perfect. I tried to analyse (for hours in last two years) the timing on the hardware side, and there is all OK. I also have written a test programm to comunicate with the MCUs and this tests have all been OK.
So it would be on the CW side to add some delay between sending the byte and reading the two bytes (one ist the hardware echo and the other the MCU response). At least as an option, because the effect depends also on the MCU (ie. the AB32 works better than Q-family).

I would be glad, if it is possible to improove the CW, so students could use a cheep MON08-Interface to use the HC08 family even if they do not have a COM port on the Laptop.I also then could put my programmer with a USB/RS232 converter built in on my homepage. (www.systech-gmbh.ch)

Saluti
Joerg

0 项奖励
回复

1,291 次查看
bigmac
Specialist III
Hello Joerg,
 
As a matter of curiosity, do you get similar problems with P&E tools?  It doesn't seem to make sense for the the Q family to be worse than the AB32, unless the internal delays for the return serial data are greater for the Q family.
 
I have attached a paper originating from FDTI, where latency issues are discussed with respect to their products.  They mention a default 16 millisecond timeout delay for the emptying of the send buffer, and that it may be reduced to a minimum of one millisecond.  Do you already do this?
 
I wonder if the 1ms latency is causing the problem, or whether it is actually greater (say 16 ms).  I also wonder if the CW software messes up because it mistakes the delayed echo as the second returned byte, because it is not synchronous with the byte that was sent.  Perhaps you could artificially introduce a delay when testing with a real serial port, and establish the actual delay that starts becoming problematic.
 
Regards,
Mac
 
0 项奖励
回复

1,291 次查看
joerg
Contributor II
Dear Bigmac

Thanks for the research. But I have contacted FTDI a year ago and then I tried all the possibilities with the latency (it seemed to be more bingo!) -> and nothing was improving the situation. The recently I have tried other USB/RS232 converters and they all did not work with CW3.1, CW5.0 and CW5.1 nether with the PROG08SZ V. 2.05. That’s why for my opinion “e ora” (as Italian would say -> “it is time”) for Freescale or PE to do something for eliminating the problem! Even if I would write a programming software for the HC08 family I am not able to integrate the debugging functions into the IDE (CW)! Not knowing the implementation is also a handicap for analysing the real source of the problem. It is a simple fact, that there is a timing problem using (probably old) routines not regarding the new generation of OS like XP where for speed improvements FIFOs are used.

I simply am tired to spent hours in searching the reason of the case and so I think it is on Freescale to go ahead and find a solution to solve the problem! That’s why I would like to have contact with “the right person”.

Saluti
Joerg

PS. The winter is arriving -> last week is was 22.5̊C during the day; today it is only 5̊C!!
0 项奖励
回复

1,291 次查看
peg
Senior Contributor IV
Hi joerg,
 
I seem to recall that John Hartman (of NoICE fame) was doing some research into problems with USB to serial converters and MON08. Have you contacted him?
Although I think his main concern was the "break" issue with most of these converters.
 
 
Regards
David
 

Message Edited by peg on 2006-11-0502:12 PM

0 项奖励
回复

1,291 次查看
Alban
Senior Contributor II
Hi Joerg,

Even if I understand what you mean, I don't really see what could be done about it on the MCU side.

I mean, the Serial port is sending orders and should wait for the results of the command from the MCU.
If it's getting excited and does not do this, well I think it is normal it does not work.

All USB/RS232 working under Windows XP should create a COM port entry in the System - Hardware Manager.
You can edit this COM port to change its number and adapt its parameters: FIFO off.

Cheers,
Alban.