Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NRG2 Debug
09-18-2017, 02:32 AM
Post: #1
NRG2 Debug
Hello all,

I have a sketch that I've successfully flashed to NRG1.1 and NRG2 boards in the past, but am now having trouble getting it to run. I'd like to see where the code is hanging.

For some background, I'm running NRG2 boards on minibat 1.0 modules with SI7021 sensors. The project is to read the temperature and humidity from the sensor. I'm using Arduino 1.6.5 (I've tried 1.6.7 and 1.8.1 as well), because I've had success with it before. I'm flashing over an FT232RL with the ti-bsl programmer and "panStamp NRG 2 w/ cc430f5137" board selected.

The sketch successfully flashes and boots. I get the initial boot output via serial and it chokes soon after the call to read the SI7021. Logging the I2C bus, all I see is an initial, synchronous low>high on both SCL and SDA which lasts for half a second and then drops back low.

My guess is a bug in one of libraries, but I can't figure out how to bring up a debugger to identify where it is stuck. If anyone knows a likely culprit, that would be appreciated, but I'd really like to know how to run a debugger on these.
Find all posts by this user
Quote this message in a reply
09-18-2017, 04:59 PM
Post: #2
RE: NRG2 Debug
Is this a custom sketch? Have you tried with our htusensor sketch and Sparkfun's library?
https://github.com/panStamp/swap/tree/ma.../htusensor

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
09-25-2017, 01:47 AM
Post: #3
RE: NRG2 Debug
As I said, it has worked in the past. I have 3 sensors already deployed that use this code, but it's been years since I've successfully imaged one. This is a custom sketch that appears to be modified from the temphum example. I am using an SI7021 library, but I can't confirm the origin. If I could run a debugger to see where the code is hanging, that would be helpful now and would have saved me a lot of time in the past.

Unfortunately, I have very little time to work on this, so I probably won't be able to try the htusensor sketch within the next few weeks, but thank you for your help.
Find all posts by this user
Quote this message in a reply
09-25-2017, 08:47 PM
Post: #4
RE: NRG2 Debug
Being NRG-based boards with the SI7021 sensor, you'll need to program "htusensor" and not "temphum". If you only need temperatures and humidities to be reported periodically and as far as you are using the default frequency (868 MHz) and Network ID then "htusensor" should work without modification.

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)