When the program starts it reads 255.
When i press the button the first time this changes to 0 and 0 after write.
Any button press after that changes it to 1 then to 0 again after the read.
Output:
I have tried the version on code share i have also tried to apply the bug fix for the write method posted here on page 3 but it doesnāt change any thing.
I have also tried to run this code without the debugger and outputting the information to a N18 display same result!
I am never calling EraseBlock could that be it?
and if i need to call it how do i determine when to call it? i guess i should call it the first time it boots after a flash?
This does not work as i get āCannot implicitly convert type āuintā to āGHI.Processor.Registerāā.
So tried to use register.Value but that doesnāt seem to work as the value that is saved seems to be randomā¦
If i try to call EraseBlock i get
Exception was thrown: System.Exception
GHI.Processor.Register::set_Value
STM32F4.IO.InternalStorage::EraseBlock
Counter.Program::timer_Tick
Gadgeteer.Timer::dt_Tick
Microsoft.SPOT.DispatcherTimer::FireTick
Microsoft.SPOT.Dispatcher::PushFrameImpl
Microsoft.SPOT.Dispatcher::PushFrame
Microsoft.SPOT.Dispatcher::Run
Gadgeteer.Program::Run
Counter.Program::Main