zunoLoadCFGParam() - random output

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
bastibart
Posts: 22
Joined: 12 Dec 2018 16:37

zunoLoadCFGParam() - random output

Post by bastibart » 17 Dec 2018 18:42

Hello guys

Sorry to bugger you again but there appears to be a problem with reading parameters from the EPROM.

Code: Select all

ZUNO_SETUP_CFGPARAMETER_HANDLER(myHandler())

void myHandler(byte param, word *pVal) {}

loop() {
  word val1;
  zunoLoadCFGParam((byte)64, &val1); 
  Serial.println(val1);
}
Produces this random output:

319
57627
57489
319
30482
30482
6953

=========================
REVISION:02.14
Z-WAVE FREQUENCY:EU
ORIGINAL FW. CRC32: 45 54 B1 BC
MAXIMUM CODE SIZE: 30 KB
CURRENT FW. CRC16: FE A1
RADIO CHANNELS: 02

bastibart
Posts: 22
Joined: 12 Dec 2018 16:37

Re: zunoLoadCFGParam() - random output

Post by bastibart » 19 Dec 2018 13:28

Hi guys

I will answer the question myself.

The variable param must be static (or global) for the following to give reasonable results.
No idea why. Maybe Serial.print() is asynchronous and does not store pending date in persistent buffer.

static word param;
zunoLoadCFGParam(64, &Param);
Serial.println(param);

Post Reply