So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By McChubby007
#79961
McChubby007 wrote:I very much doubt that that is your problem.

Can you zip and attach your code and I will look at it. If nothing else I will give it a once over with my critical eye.

Briefly, can you describe what and how you are doing things? Are you using an interrupt routine (ISR) at the moment, and if not how are you timing each operation? In any case, post the code and I'm sure I will work it out.

Are you aware that there are things that you should NEVER do in an interrupt routine? Like prints, I/O operations etc. This is a newbie error and I apologise if you know this.
User avatar
By lucasromeiro
#79962
McChubby007 wrote:
McChubby007 wrote:I very much doubt that that is your problem.

Can you zip and attach your code and I will look at it. If nothing else I will give it a once over with my critical eye.

Briefly, can you describe what and how you are doing things? Are you using an interrupt routine (ISR) at the moment, and if not how are you timing each operation? In any case, post the code and I'm sure I will work it out.

Are you aware that there are things that you should NEVER do in an interrupt routine? Like prints, I/O operations etc. This is a newbie error and I apologise if you know this.


Hello! I would like to send the code, but it is from the company I work for. I will try to make a similar demonstration tomorrow and sending. but it is simple. when I have an external interrupt registered that in the ISR has only the increment of a global variable and the use to write its value in a file happen sporadic errors, causing the esp to reset. when it resets is that frequency is still on the pin it continues resetting several times in a row without stopping, with few seconds after the last reset. this problem happens at low frequencies between 1 and 20hz
User avatar
By McChubby007
#79966 OK.

Is the variable you are changing in the isr a simple data type (int etc) and is it marked as 'volatile' in the global declaration of it? It also has to be 'atomic' which means a read/write to a variable with a bit size smaller or same as the architecture which in this case is 32 bit. Also, is it aligned on the correct memory boundary, and if yu comment out the access to the variable in just the main code (or the idr) does the wdt reset go away?

Yes, a simple example replicating the problem is always a good start - it is something us 'professionals' will do when other methods of fault detection fail.