I'm using the ST72C254 microcontroller. After a external reset without power-down I find that the value of the variables in RAM changed. The value changes after 30-40 times. Did you just find the same problems?
Are you sure you are not using startup routines of the compiler ? These reset the variables to 0 or the init value declared. If you want to use the RAM values after reset, I think you dont have to use startup. What do you say ?
Hello, in the startup routine I use only the RSP instruction and the CALL to 2 functions: CheckRAM and MAIN. In the MAIN function I have a never-ending loop that continues to write 0 in 4 variables. In the CheckRAM routine, called after reset, I control if the value of the 4 variables is 0. I see that in this so simple program the value is still not 0 after 1 hour. If the program is more complex the value changes after 30-40 external reset (5 seconds between 2 resets)
Hi, I'm using the COSMIC compiler version 4_2b. In the attached files you can see that after power_on 4 variables are set to 0. In the main loop the 4 variables are always set to 0 and it is the only instruction done. Then after every reset in the function ConfrontoRAM I check if the variables are all 0, if it isn't the green led is switched off else it is switched on. I see that after 30 minutes the green led is switched_off. This problem is seen in the ST72254 but the same software doesn't have any problem in the st72264
Posted on June 17, 2004 at 13:12Hi, maybe some spurious interrupt that you're not servicing? Try to disable interrutps explicitly in the startup. Just a thougth. How are you creating resets? With the reset line (button)? Watchdog? LVD? By the way, I can't compile your code as it is posted, I guess you have modified the header file; please post it. Regards, Luca
Hi, I attach the vector table and the I-O definition of the ports. I create an external reset on the reset pin using a signal generator. The problem is not visible if the reset is caused with a WDG reset.
I see no problem with the code. On a side note (that I'm afraid won't help you much), to access the single bits of hardware registers, there's an alternative that is probably a bit simpler (but maybe less portable) than the structures you have declared: _Bool