Thursday, March 28, 2013

Wake up nRF51, wake up! You have Math to do!


Ah ha! I found it! How to have the nRF51422 wake up on sensing the ADS1247 is ready to be read. Unlike the ADS8321 I previously used which converts as it reads out, the ADS1247 takes a little while to do a conversion (depending on the rate it is set to), and as such the nRF51422 can take a nap most of the time. Otherwise it’s just burning through electrons pointlessly.

In the included libraries it defines the pins generically… but without interrupt, however in the powermeter example it defines the buttons manually in another library… with interrupts.

Below is an excerpt for button press with interrupt:


Below is an excerpt for a generic GPIO without interrupt:


Some additional coding and configuration should allow me to sense the gpio pin that the DRDY line from the ADS1247 is connected to. When the line goes low the data is ready, and the nRF51 can wake up do a read, store the data, and sent it back to me via UART on the SEGGER J-Link. Later it’ll store the data for averaging later. This is the last major breakthrough I needed to figure out how to keep the nRF51422 in sleepy-time mode (Without using the above pictured Tea).


Onto gyro evaluation next. I just got confirmation my order shipped. My order from Adafruit on the thermocouple and thermocouple IC shipped. I haven’t heard about my solidstate relay though.


(Needed some other supplies too!)

No comments:

Post a Comment