This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

2 Boards, 1 Programm -> 1 works, 1 doesn't work

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

Parents Reply Children
  • "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

  • 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
    

    that I've turned to

    #define NOVRAM_ADDR  (0x200000)
    #define NOVRAM_SIZE  (0x2000)
    

    and now everything works fine...

    Thanks again and best regards,
    Torsten