robtillaart:
trystatic prog_uint32_t TESTCONSTANT=4000000UL; // UL = unsigned long
does that help?
unfortunately not. Here is the test case and result
code:
#include <avr/pgmspace.h>
void setup() {
Serial.begin(115200);
Serial.write("Here we go...\n");
static prog_uint32_t TESTCONSTANT1=4000000L;
static prog_uint32_t TESTCONSTANT2=4000000;
static prog_uint32_t PROGMEM MAX_U32=4294967200;
Serial.write("TESTCONSTANT1=");
Serial.println(pgm_read_dword_near(&TESTCONSTANT1));
Serial.write("TESTCONSTANT2=");
Serial.println(pgm_read_dword_near(&(TESTCONSTANT2)));
Serial.write("MAX_U32=");
Serial.println(pgm_read_dword_near(&MAX_U32));
}
void loop() {
}
result (notice the huge MAX_U32 is working for some reason)...
Here we go
TESTCONSTANT1=29885333
TESTCONSTANT2=2484002864
MAX_U32=4294967200