Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadAnalog fails #253

Closed
drpuur opened this issue Jun 11, 2020 · 10 comments
Closed

ReadAnalog fails #253

drpuur opened this issue Jun 11, 2020 · 10 comments
Assignees
Labels

Comments

@drpuur
Copy link

drpuur commented Jun 11, 2020

I am using MCCI 4610 and see "?CatenaStm32L0::ReadAnalog(3): CatenaStm32L0_ReadAnalog() failed (5)" messages as in #125

This happens not all the time and seems to start happening only after some time.

Board Version: 2.7.0
System Clock: 24 MHz

Libraries:

URL Commit Commit Date
https://github.com/mcci-catena/arduino-lmic.git 6fe04ec Tue, 12 May 2020 09:16:47 -0400
https://github.com/mcci-catena/arduino-lorawan.git 4bc0d48 Sat, 9 May 2020 12:38:28 -0400
https://github.com/mcci-catena/Catena-Arduino-Platform.git 92019ca Tue, 12 May 2020 01:34:08 -0400
https://github.com/mcci-catena/Catena-mcciadk.git a428006 Sat, 21 Dec 2019 20:45:26 -0500
https://github.com/mcci-catena/MCCI_FRAM_I2C.git f0a5ea5 Sat, 21 Dec 2019 16:17:01 -0500

I read the battery voltage on every iteration (after waking up from deep sleep):

  // vBat
  int vbat_mv = (int)(gCatena.ReadVbat() * 1000.0f);
  gCatena.SafePrintf("vBat:    %d mV\n", vbat_mv);

Attached is the log with the relevant lines.
ReadAnalog-errors.txt

@dhineshkumarmcci
Copy link
Contributor

@drpuur Thank you for bringing in the issue. Right time you raised this, We are already working on it. We have pushed a patch in the branch issue253. Can you please pull changes to your libraries and let us know how it works?

@drpuur
Copy link
Author

drpuur commented Jun 11, 2020

@dhineshkumarmcci Great! I have just recompiled with branch issue253 and will let you know about the results.

@drpuur
Copy link
Author

drpuur commented Jun 11, 2020

Not sure if this is related, but since this patch the node does not join any longer. I see the join requests in the console of the Lorawan Network (Swisscom), but it looks like the node never receives the join accept (even though SF12 is used).

I then did a reset of the board (using the switch), and now it looks like it lost the provisioning.

I attach the full log.
serial-swisscom-11jun2020-1.txt

@drpuur
Copy link
Author

drpuur commented Jun 11, 2020

It's pretty strange: I did a reset again (this time with "system reset"), and now the node came up just fine and also joined the network. I will capture the output again and report back.

@dhineshkumarmcci
Copy link
Contributor

dhineshkumarmcci commented Jun 12, 2020 via email

@drpuur
Copy link
Author

drpuur commented Jun 12, 2020 via email

@drpuur
Copy link
Author

drpuur commented Jun 13, 2020

The error did not happen anymore so it really looks like this has been fixed. See Log.

ReadAnalog.log

@dhineshkumarmcci
Copy link
Contributor

@drpuur Thank you for the update.

terrillmoore added a commit that referenced this issue Jun 15, 2020
Fix #253: Use AdcStart() before each ReadAnalog value
terrillmoore added a commit that referenced this issue Jun 15, 2020
Revert "Fix #253: Use AdcStart() before each ReadAnalog value"
terrillmoore added a commit that referenced this issue Jun 16, 2020
Fix #253: Use AdcStart() before each ReadAnalog value; thanks for adding the documentation changes.
terrillmoore added a commit that referenced this issue Jun 26, 2020
Revert "update "Fix #253: Use AdcStart() before each ReadAnalog value""
@terrillmoore terrillmoore reopened this Jun 26, 2020
@terrillmoore
Copy link
Member

This still has not been addressed. The reversion was never pushed again, but the docs were pushed.

@terrillmoore
Copy link
Member

@mcciyssaroha please coordinate straightening this out.

terrillmoore added a commit that referenced this issue Jul 31, 2020
Fix #253: add AdcStart() before each AdcGetValue()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants