Author Topic: Moteinos + DS3234 RTC sharing SPI - require hard reset each time?  (Read 14522 times)

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: Moteinos + DS3234 RTC sharing SPI - require hard reset each time?
« Reply #45 on: April 28, 2016, 06:25:24 PM »
I'll mention it again, but I had trouble getting SD cards to release the MISO line when de-selected on a previous project. The 'scope showed a clear over-driving waveform even though the SD card was de-selected. Solution was a 470R resistor on the MISO output of the SD card so other slaves could over-drive it. Something to look for if you have a 'scope handy.
Mark.
Edit: That was despite giving dummy clocks at the end of the cycle, it steadfastly refused to release MISO.
« Last Edit: April 28, 2016, 07:54:25 PM by perky »

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Moteinos + DS3234 RTC sharing SPI - require hard reset each time?
« Reply #46 on: April 28, 2016, 06:26:36 PM »
@Perky It's worth your knowing, if you're not already aware, that if the node has an RTC, then the RFM69's Listen Mode is obsolete.  You can get much higher energy efficiency using the RTC to wake the mcu (which, if properly configured, can take as little as 4us) and having the mcu then manage a similar kind of Listen Mode.  That's because, using Joes method, the initial Rx listen window (which simply checks for high RSSI) can be as little as 7us.  So, the cumulative energy savings really can be quite significant.

It's for that and related reasons that the new upcoming Moteino, if it happens, pretty much needs to have an energy efficient RTC, or similar standalone timer, if it is to harvest the full value of the recent energy related software developments by folks like Joe and Tom and others.
« Last Edit: April 28, 2016, 08:05:03 PM by WhiteHare »

TomWS

  • Hero Member
  • *****
  • Posts: 1929
Re: Moteinos + DS3234 RTC sharing SPI - require hard reset each time?
« Reply #47 on: April 28, 2016, 10:57:21 PM »
I'll mention it again, but I had trouble getting SD cards to release the MISO line when de-selected on a previous project. The 'scope showed a clear over-driving waveform even though the SD card was de-selected. Solution was a 470R resistor on the MISO output of the SD card so other slaves could over-drive it. Something to look for if you have a 'scope handy.
Mark.
Edit: That was despite giving dummy clocks at the end of the cycle, it steadfastly refused to release MISO.
Fascinating.  I'll poke on it.  Thanks for the edit, that was important piece of data.
Tom

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: Moteinos + DS3234 RTC sharing SPI - require hard reset each time?
« Reply #48 on: April 29, 2016, 03:24:08 AM »
@WhiteHare: C
Quote
You can get much higher energy efficiency using the RTC to wake the mcu (which, if properly configured, can take as little as 4us) and having the mcu then manage a similar kind of Listen Mode.  That's because, using Joes method, the initial Rx listen window (which simply checks for high RSSI) can be as little as 7us.  So, the cumulative energy savings really can be quite significant.
Can you explain what you meant by this? Waking the MCU, then waking the radio via SPI to put into RX mode, getting an RSSI interrupt, reading the RSSI value and putting the radio back to sleep via SPI surely takes a lot longer than that! Did you mean uA?

joelucid

  • Hero Member
  • *****
  • Posts: 867
Re: Moteinos + DS3234 RTC sharing SPI - require hard reset each time?
« Reply #49 on: April 29, 2016, 04:18:32 AM »
Quote
Can you explain what you meant by this? Waking the MCU, then waking the radio via SPI to put into RX mode, getting an RSSI interrupt, reading the RSSI value and putting the radio back to sleep via SPI surely takes a lot longer than that! Did you mean uA?

WhiteHare is correct that you can achieve significant savings using an RTC instead of the radio's listen mode. That majority of that comes from the 1.1uA of idle current the radio no longer draws. Switching off AGC, using the max possible bitrate and rxbw provides further gains if you only use the initial testing window to detect RSSI.

But the gains are nowhere enough to get below 7uS. Just on the radio side you have 250uS crystal wakeup + 80 uS PLL lock + 100uS or so to get RX ready and detect RSSI. But <200uS using 16mA is doable on the radio side I think.

Joe

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: Moteinos + DS3234 RTC sharing SPI - require hard reset each time?
« Reply #50 on: April 29, 2016, 05:42:02 AM »
I'll mention it again, but I had trouble getting SD cards to release the MISO line when de-selected on a previous project. The 'scope showed a clear over-driving waveform even though the SD card was de-selected. Solution was a 470R resistor on the MISO output of the SD card so other slaves could over-drive it. Something to look for if you have a 'scope handy.
Mark.
Edit: That was despite giving dummy clocks at the end of the cycle, it steadfastly refused to release MISO.
Fascinating.  I'll poke on it.  Thanks for the edit, that was important piece of data.
Tom
This might not of course be the issue. However I've read some reports that adding a pullup to MISO appears to improve the situation. There's often an asymmetry in drive strengths between low and high (low usually being stronger), so an SD card driving MISO high when the other slave tries to drive it low might be OK, but the other way round may not result in a level that gets above the logic 1 threshold. Adding a pullup, which otherwise should have no effect, adds to the other slaves high driving capability and may well push it above the threshold. Adding the pull-up also reduces the low driving capability, but that is often significantly stronger so has no detrimental effect.
Mark.