Quantcast
Channel: Help!! IOPWR reset, unknown cause.
Viewing all articles
Browse latest Browse all 40

Re: Help!! IOPWR reset, unknown cause. (maxruben)

$
0
0
You probably already know this, but - Be especially aware of non atomic operations in shared registers (such as interrupt flag registers and ports/lats). If the operation isn't atomic, and interrupted by a routine that also manipulates the same register, a change can get undone when the interrupted routine writes back the value to the register. Sort of a sofware read-modify-write problem. The results you are getting could for instance be caused by a CS signal being changed for an SPI channel during communication.
 
This is more of a problem with PIC32 though, since operations such as REGISTERbits.BIT=value isn't atomic but on all other PICs they are.
 
Good luck and let us know what you find.
 
/Ruben
 
 

Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>