Page 1 of 1

zunoLoadCFGParam() - random output

Posted: 17 Dec 2018 18:42
by bastibart
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

Re: zunoLoadCFGParam() - random output

Posted: 19 Dec 2018 13:28
by bastibart
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);