I hope this will help someone. I remember there was a thread where someone had problems talking to the target, while all possible clues seemed to be eliminated.
I have S12C target board, were Vcc=3.3V was not wired to BDM connector. CW 5.1 debugger was unable to connect and program until I wired Vcc to pin6 of BDM connector. Communication dialog every time showed different values for IO_DELAY_CNT. I think it's a bug. I specify known correct IO_DELAY_CNT value, but it is everytime superseded by debugger detected value. I think "Autodetect communication speed" mode should be used for autocalculation of IO_DELAY_CNT?
It is weird that NoICE debugger was communicating fine without Vcc on pin6. After wiring Vcc to pin6 both debuggers are working fine.