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

Simulated code resets, actual code does not

Hi,

I have just started using the Keil Development tools. I created a timer example that should toggle a port pin, approx every half second. With a generic 8051 it works. When I convert the code to the Cygnal C8051F320, power on resets are generated before my code gets to the wait for timer interrupts loop. The code runs ok on an actual Chip. I assume that this is not a bug, but something I am doing wrong. Could this be caused by not using the Startup.A51 file?

Parents Reply Children
  • I encouter the exact same problem with 80C51F300. the code runs fine after disabling
    the soft-watchdog in the chip , but not with the simulator.i used step execution to make sure it is the watchdog that resets the device , and I also used a breakpoint at reset address .both tricks proove that it is the watchdog that resets the device.i assume it is the nature of the watchdog that causes the problem since it is not a HW peripheral .
    i believe it can be fixed by updating the driver for F300...Am I right???
    Alex

  • Hi Alex,

    That was the first time I tried the simulator and it did not work, so I abandoned it. I don't have time right now to work on debugging Keils simulator. It's good to know that you found the same problem on an older Cygnal chip. If you find a work around let me know. I believe I had all of the latest drivers, but there is probably some work around. It just occurred to me that perhaps if the watchdog timer is enabled and properly refreshed the simulator will work. Maybe the testing of the Cygnal chips was done with the watchdog timer enabled and Keil did not realize that the simulator does not work with the watchdog timer disabled.

    Thanks for the help.

    Brad

  • Whgy, oh Why are you guys mucking around with a simulator when Cygnal gives you an ICE 'for free'?

    Erik

  • Hi,

    I doesn't work so I am not using it. But I wanted to debug my smb bus interface with the simulator. The other board has an FPGA on it and I am using the smb bus to communicate with it and other devices on that board. Since I am doing the smb bus controller on the FPGA, I would like to know that my Cygnal code is working. I ended up connecting an EEPROM to the bus for debug and then I will debug the FPGA with some confidence that the Firmware is correct.

    Brad

  • Which tool version are you using? The F320 simulation is pretty new and was added recently.

  • Hi,

    I purchased the simulator upgrad to the C compiler about two weeks ago. The CA51 to DK51 upgrade is Version 7.06 (on the envelop).

    uVision2 V2.38
    target DLL: CygC8051F.dll V1.36