I am using 2 Boards with the same layout (C167CR-LM, 1MB Flash, 256K RAM) for testing. No my problem is: ----------------- With the first Board downloading the programm in RAM with MON166 using the Bootstrap-Mode works fine. I can start and stop and proceed the programm as often as i want to. With the 2nd Board I can download the programm but after starting it (sometimes immedially after downloading) the connection to the board is lost and sometimes MON166 says: "CANNOT WRITE BREAKPOINT" If I write the programm into the flash on both boards everything works fine. But 'cause both Boards are the same It couldn't be an error in the Config.INC/Start167.a66, could it? Has anybody an idea what the cause could be? (I have already done a RAM-Test but everything seems to be ok) Thanks Torsten
Problems like yours usually come down to things like "I do not need a MAX232 in the serial line" "A RC reset works just fine" In other words, barring an actual defect, what you see is that something in your hardware is marginal. Have a look at timings, fan-in vs fan-out, Vcc stability and such and eventually you will find what the problem is. Erik
Hello Erik, Thanks for your answer. Unfortunally i've already checked the Vcc, the timings and on my board is already a MAX232 driver too. I use a RC reset for the CR167 cause in the Datasheet by Infineon this is recommended, what would be a better option for the Reset instead of a RC circuit? best regards, Torsten
A faulty soldering joint on the external address/data bus?
Hello Mike! Thanks for your fast reply! I perform a RAM & Data Bus Test before i run my application and the Test ends always successfull, that's why i can not say that it is a soldering or contact problem... best regards, Torsten
A faulty solder joint might work fine most of the time and fail only once in a while. It might be sensitive to slight bending of the PCB. A visual inspection of the quality of soldering job can do no harm. - mike
Thanks again, Mike! I'am at home now and I will have a second look tomorrow. best regards, Torsten
It may be problem with variables initialization. It looks like some variables have random initial values. may be only one value, like 0xff is fatal for you program.
"I perform a RAM & Data Bus Test before i run my application and the Test ends always successfull" What sort of RAM test are you using? Have you tested the test?! It has been known for people to devise memory tests that pass even with no memory chips fitted! See http://www.8052.com/forum/read.phtml?id=39484
"It may be problem with variables initialization. It looks like some variables have random initial values. may be only one value, like 0xff is fatal for you program." That is why good programming practice demands that you never use an uninitialised variable!
@Andy: I do the following RAM/DataBUS-Tests: DataBus Test: 1: Walking 1s and Walking 0s RAM Cell Test: 2: writing the whole RAM with 0x55 and read back after writing all the 256k 3: the same as 2nd, but with 0xAA RAM Simple Adress Test: 4: writing the whole ram with Byte 1 of it's 24-bit-adress (for instance: wrting 0x10 to address 0x10A6B2) 5: writing the whole ram with Byte 2 of it's 24-bit-adress (for instance: wrting 0xA6 to address 0x10A6B2) and read back after writing all the 256k 5: writing the whole ram with Byte 3 of it's 24-bit-adress (for instance: wrting 0xB2 to address 0x10A6B2) and read back after writing all the 256k @V K: I guess they are ALL initialized correctly , but I'll check it tomorrow :) Good night, Torsten
See http://www.8052.com/forum/read.phtml?id=39484 One of the first articles I've read before writing the RAM tests 10 Months ago :) Torsten
That is why good programming practice demands that you never use an uninitialised variable! Yes,it is! But it is good programming practice to test programms with random initial values. :-)
Thanks a lot to all of you! There where 3 unitialized Variables and 2 macros without braces:
#define NOVRAM_ADDR 0x200000 #define NOVRAM_SIZE 0x2000
#define NOVRAM_ADDR (0x200000) #define NOVRAM_SIZE (0x2000)