2004-06-18 03:48 AM
2004-05-28 04:06 AM
Hello,
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?2004-06-01 05:28 PM
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 ?
2004-06-02 07:58 PM
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)
2004-06-14 05:34 PM
Which compiler you are using ? Metrowerks/cosmic/assembly tool chain ? Can you attach your source code ?
2004-06-16 11:15 PM
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
________________ Attachments : main.rtf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I09G&d=%2Fa%2F0X0000000bUp%2Ffn.G8LJDlLjM1AEAjDEwZojKIZa0vXUi8ygS1oEdJ8E&asPdf=falseSTARTUP.S : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0B1&d=%2Fa%2F0X0000000bUo%2FMgnswLgRVyA9K9eSGYpBi_d0u77E6PM9MH20XRXS6Js&asPdf=false2004-06-17 04:12 AM
2004-06-17 05:07 AM
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.
Thank you ________________ Attachments : io72212.rtf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Aw&d=%2Fa%2F0X0000000bUk%2FnuuVQgjgKkU.tHhdipTS564nFo7kqwGJDKSP0dPa.0Y&asPdf=falsevector.rtf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I08S&d=%2Fa%2F0X0000000bUl%2F7ksBM9vjW1i.dsTl2A8EUI1fqhXbfybEbI.cweKJxa0&asPdf=false2004-06-18 03:48 AM
Hi,
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: _Boolmailto:PA0@PADR:0
; // absolute bit variable Good Luck, Luca