B4R Question Arduino due , memory mismatch


Licensed User
Longtime User

my application use 55 Kb , 10% that are 10% of the memory.
now i have the following phenomenon:

in the AppStart this lines of Code makes trouble:
  ' Lesen der Einstellungen vom EEprom
   Dim LastCode As Int = DS3231.EepromReadInt(0)
   Dim ProjektCode As Int = 2222
   Log("Projektcode=",ProjektCode,"  Read:",LastCode)

everytime the value for ProjektCode and Lastcode are the same !!!!
But this is not possible while the declaration of projektcode is AFTER reading the eeprom.value.

The value in the eeprom is definitiv not 2222!!
The same when reading another adress or changing the value.

The rest of the application seems work correctly.

When i put this codelines in a shorter projekt with the same board it works fine.

( in another case with arduino ide i have had in the past a similar problem ( some pins suddenly don't work)

Has someone an idea how to solve the problem ??

Thanks for all hints.


Licensed User
Longtime User
Is it possible that you are later writing ProjektCode to the EEPROM?

It can be confusing as the program is actually started twice whenever you run it.

Hi Erel,
i have put it in a timer and now it seems do work :)
Upvote 0

Similar Threads