View Single Post
Old 20 September 2021, 13:21   #42
saimo
Registered User
 
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 787
Quote:
Originally Posted by modrobert View Post
I have worked with code to access I2C before, both in hardware (VHDL) and software.
That's a great help. This is the first time for me, instead.

Quote:
My point was more about the reason C= turns off interrupts completely with Disable() before accessing NVRAM, perhaps there is some conflict which is happening when you run with interrupts enabled?
The first thing that comes to mind is ensuring that timings don't get disrupted, but in the datasheet there's nothing that suggests that operations should be obligatorily done in a certain amount of time (i.e. stretching the clock isn't an issue, while shortening it is) - so, I'd exclude this.
Maybe it's related to Akiko (seems unlikely to me, though)?
Or it could be just a safety measure to prevent corruption due to misbehaving tasks or even parallel attempts at accessing the NVRAM.

Quote:
When you use the term "OS off/trashed" I assume you mean Forbid(), which is not the same as turning off all interrupts, it only disables multitasking.
Nope, I mean Disable(), no interrupt enabled afterwards and possibly completely trashed OS (due to need of RAM). The only thing my code doesn't do (yet) is executing the routines in supervisor / level 7 interrupts mode to exclude also interference by NMIs potentially generated by add-on hardware.
saimo is offline  
 
Page generated in 0.04623 seconds with 11 queries