Feather M0 LoRa AHT20 DS3231 Featherwing locks up

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
wb4dhc
 
Posts: 10
Joined: Fri Dec 19, 2014 7:23 pm

Feather M0 LoRa AHT20 DS3231 Featherwing locks up

Post by wb4dhc »

I am running a AHT20 connected to the Feather M0 I2C bus. Works perfectly. I added a FeatherWing DS3231 RTC and then plugged the AHT20 into it's stacking header. Running the DS3231 example program works great. Running the AHT20 program works great. When I put the RTC code into the AHT20 program it locks up when there is any access to the RTC (either setting or reading time). Seems that there is a I2C bus conflict but only for the RTC.

Any thoughts would be appreciated.

User avatar
reschue
 
Posts: 157
Joined: Sun Jun 17, 2018 4:36 pm

Re: Feather M0 LoRa AHT20 DS3231 Featherwing locks up

Post by reschue »

OK, I'll bite.....

I'm assuming that in all three versions of your program (AHT20 only, DS3231 only, and both) the hardware is exactly the same. All the I2C peripherals are connected whether the program running uses them or not. Correct? It's not something simple like duplicated pull ups on SDA.

How close together are the accesses to the AHT20 and the DS3231? Are they back-to-back, so separated by a couple of milliseconds?

What's going on when the program locks up? Does it stop dead in the middle of an I2C cycle, or is it spinning in a loop waiting for a value (possibly being read and re-read from the I2C bus) to change? If you aren't certain, add some more diagnostic println's to your program.

Rick

User avatar
wb4dhc
 
Posts: 10
Joined: Fri Dec 19, 2014 7:23 pm

Re: Feather M0 LoRa AHT20 DS3231 Featherwing locks up

Post by wb4dhc »

Yes it is exactly the same hardware board. All devices are connected at all times. Seems that when both are enabled in the script there is a problem with the 2nd access.

User avatar
wb4dhc
 
Posts: 10
Joined: Fri Dec 19, 2014 7:23 pm

Re: Feather M0 LoRa AHT20 DS3231 Featherwing locks up

Post by wb4dhc »

Yes it is exactly the same hardware board. All devices are connected at all times. Seems that when both are enabled in the script there is a problem with the 2nd access.

User avatar
reschue
 
Posts: 157
Joined: Sun Jun 17, 2018 4:36 pm

Re: Feather M0 LoRa AHT20 DS3231 Featherwing locks up

Post by reschue »

The key to solving this issue will be determining exactly where the program is "hanging". This can be done by sprinkling a lot of Serial.println("I got here!") stuff into the program.

Or, you can strip the program down to the bare minimum and incrementally add in stuff until it "hangs". For example, can you put together a test sketch that just does a single read access to the AHT20, followed by a single read access to the DS3231? Then if that works, do a read followed by a write followed by another read to confirm you can "read/modify/write" a register in one of the chips. Dump out the data you read to the serial port with Serial.print() statements to confirm the reads and writes are working.

It would be helpful to see your actual code - or at least a simplified version of it that demonstrates the problem.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”