HI, I am trying to communicate with a board that has the XC161 step AA and one 8bit external RAM at CS0 for debugging. Until now the success ( :) ) is : in EA and bootstrap, sending a 0x0 the uP answers with A5 which I believe is fine! I have KEIL ULINK but I only get "device can not enter bypass mode. connection to target missing or incorrect." like if it is not connected. I have been trying to understand th OCDS and it seems it must have a monitor!? Does ULINK has all this? That is if connect ULINK and call it on uVision I must get something even if no sw is loaded? I make some measurements and I see TRST changing but nothing on TDO! Also I can not load any monitor on the board. So in conclusion I can not load anything on it. Does anyone has evere worked with XC161 and has any monitor or ULINK experience? If so can anyone explain to me if there is some tricks with it? thanks ards2all, joao
Hi, Here is what I have come to: 1) OCDS with ULINK my connector on board is like this: (I use 82K because I do not have 100K at hand, hope this is ok!) pin | connected to ------------------ 1 | uP TMS pin and 82K to +5V 2 | +5V 3 | uP TDO pin 4,5 | GND 6 | GND 7 | uP TDI pin and 82K to +5V 8 | to MAX 811 - supervisor (~10k pull up) 9 | uP TRST and 82K to GND 10 | uP brkout 11 | uP TCK and 82K to +5V 12 | GND 13 | UP brkin and 82K to +5V 14,15,16 | NC I see the TCK pin going from almost zero to 3.3V and the TRST from zero to 2.9V when I run dscope for ULINK The reset pin is always at 3.8v The error is always can not enter bypass mode. I have EA at +5v and jumper for bootstrap not placed. I believe this is not important for OCDS? Tomorrow I believe I can get a logic analyser so that I can spy better but any comments from hwat I have written here? 2) Monitor After sending 0x00 the uP answers with 0xD5 NOT 0xA5 as I have told.sorry. The error is "connection to target system lost". I have the EA and bootstrap jumpers placed and the ULINK connector is NOT placed! I am using the monitor from the example for xc16x board. I have modified the boot file as follows: first I have placed: " BOOT PROC NEAR START: DISWDT MOV R0,#0020H ; Start of bootstrap code ; MOV DPP0,#PAG START2 LAB2: BCLR S0RIR LAB1: JNB S0RIR,LAB1 ; when CPU expects 32 Bytes ; MOVB [R0],S0RBUF MOV S0TBUF,S0RBUF JNB S0TIR,$ CMPI1 R0,#SOF(ENDBOOT)-1 JMPR CC_NZ,LAB2 JMP START2 " and spying on the RX line I get lots of bytes so it seems this part is running. But when I put the original and change the following: " START2 PROC FAR BSET S0TIR MOV S0TBUF,#031H JNB S0TIR,$ MOV CP,#0F7D0H " I do not get the 31h char! Shouldnt I get the 31H on rx? It seems that it is not loading this part well! Any comments will be welcomed :) I am thinking that even if the RAM is not OK or the port0 configuration is also not ok the 31H should be sented. Thinking well? NOTE1: When starting this thread I get an error on loading from the internet so I clicked again and oops two threads! I am sorry for this NOTE2: I am using step AA XC161 and I hope nothing wrong with it that affects this!
As far as I remember, the AA step has a broken bootstrap loader. We switched very early to AB step because of that. Now, the current stepping is AD.
It is right from the KEIL support, the loader of step AA receives only 28 bytes. In BSL Mode you should receive 0xD5 + ID Regs which are for XC161 1820h IDMANUF 2001h or 2002h or 2301 IDCHIP 3020h IDMEM 4040h IDPROG With OCDS I have no experiences at this time. But there are some hints for OCDS in the erratas. Stefan