EEPROM write fail in 2.1.3

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
aleconakad
Posts: 68
Joined: 18 Jan 2016 15:25

EEPROM write fail in 2.1.3

Post by aleconakad »

Hi,

I was trying an EEPROM example using latest release 2.1.3. The write was always failing and returning 1. I was using the reference example:
https://z-uno.z-wave.me/Reference/EEPROM/

I tried to fallback to 2.1.1 and still the same problem. It seems something related to the new toolchain 00.08.60 since I did not encounter such an issue with 2.1.1 and toolchain 00.08.50, or it might be that my Z-uno has some HW issues.

I would be glad to try with toolchain 00.08.50 again but I don't know how to revert back to it.
A feedback is appreciated.

NB: my Z-Uno is not connected to any peripherals and is driven entirely by the USB cable connected to my MAC. I didn't try it on Windows yet.
aleconakad
Posts: 68
Joined: 18 Jan 2016 15:25

Re: EEPROM write fail in 2.1.3

Post by aleconakad »

Hi,

a slight update: I managed to revert back to 2.1.1 and 00.08.50 toolchain and unfortunately I can still see this problem. I think maybe that my Z-uno is defect.

@PoltoS: Is there any trick I can do to make the EEPROM write operational again? Otherwise the Z-Uno will be sent back to seller.
Regards
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: EEPROM write fail in 2.1.3

Post by PoltoS »

If your Z-Uno is remembering it's nodeId/networkId, the EEPROM is ok. We will check the EEPROM API on our side - may be something is broken in the code.

Please try first clean EEPROM in the Arduino IDE menu.
aleconakad
Posts: 68
Joined: 18 Jan 2016 15:25

Re: EEPROM write fail in 2.1.3

Post by aleconakad »

Hi,

"Please try first clean EEPROM in the Arduino IDE menu." How do you do that? I don't see such an entry in the Arduino IDE menu.
Furthermore, I did not include my Z-Uno in any Z-Wave network yet.
aleconakad
Posts: 68
Joined: 18 Jan 2016 15:25

Re: EEPROM write fail in 2.1.3

Post by aleconakad »

Hi,

update from my side:
- EEPROM is working correctly.
- Issue is related to the example sketch.
At line 18: instead of

Code: Select all

Serial.print(EEPROM.read(i),HEX);

it should be

Code: Select all

Serial.print(EEPROM.read(addr + i),HEX);
otherwise it will always print the content of EEPROM at address 0x0000 which is always 0xFF.

- Furthermore, the functions

Code: Select all

EEPROM.get(...)
and

Code: Select all

EEPROM.put(...)
are not well documented, as they do not return the number of bytes written or read, instead they return always 1 (which I assume is TRUE in case of success).

@PoltoS: could you please check it and give me a feedback to my findings? Thanks
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: EEPROM write fail in 2.1.3

Post by PoltoS »

Checked that, indeed the API changed few versions ago to return only Ok (1) and fail (0). Thank you for your report, we have fix the doc and the example accordingly
Post Reply