Reading from PGM returns 65535 instead of 255
Quote from steinm on December 14, 2023, 11:51 amWhen reading from an unitialized PGM a value of 0xff will read as 65535. Once it was set to 255 it will return 255. From within the MCU Monitor you cannot tell if a value was explicitly set or not, but reading a byte shouldn't return a value > 255 anyway.
I read from PGM in a reset() function
cych = component.readPGM( PC++ );
When reading from an unitialized PGM a value of 0xff will read as 65535. Once it was set to 255 it will return 255. From within the MCU Monitor you cannot tell if a value was explicitly set or not, but reading a byte shouldn't return a value > 255 anyway.
I read from PGM in a reset() function
cych = component.readPGM( PC++ );
Quote from arcachofo on December 14, 2023, 12:10 pmbut reading a byte shouldn't return a value > 255 anyway.
That depends on the PGM word size.
You should set: progword="1" in the definition file if you want only 1 byte.
but reading a byte shouldn't return a value > 255 anyway.
That depends on the PGM word size.
You should set: progword="1" in the definition file if you want only 1 byte.
Quote from steinm on December 14, 2023, 12:53 pmIt's actually set and reading from PGM returns single bytes just like expected, but only if the value in PGM was set before.
It's actually set and reading from PGM returns single bytes just like expected, but only if the value in PGM was set before.
Quote from steinm on December 14, 2023, 4:20 pmLooks like it's getting worse. Now
component.readPGM( PC++ );
returns 1 instead of 65535
Looks like it's getting worse. Now component.readPGM( PC++ );
returns 1 instead of 65535