You need to log in to create posts and topics.

Reading from PGM returns 65535 instead of 255

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++ );

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.

It's actually set and reading from PGM returns single bytes just like expected, but only if the value in PGM was set before.

Ok, I see what you mean.

Hopefully solved at Rev 2091.

 

Looks like it's getting worse. Now component.readPGM( PC++ ); returns 1 instead of 65535

Oh sorry.

Fixed at Rev 2092.