ULP for SPI sensors
ULP for SPI sensors
Hi,
Will it be possible to collect sensor data from SPI interface using ULP? I'd expect it should be similar case as getting sensor data from I2C, but not sure how if there is any problem to make it work that way.
Also, I'd expect ULP can initiate SPI read/write based on interrupt signal coming from another GPIO pin. If possible, a simple example will be greatly appreciated.
Thanks,
Will it be possible to collect sensor data from SPI interface using ULP? I'd expect it should be similar case as getting sensor data from I2C, but not sure how if there is any problem to make it work that way.
Also, I'd expect ULP can initiate SPI read/write based on interrupt signal coming from another GPIO pin. If possible, a simple example will be greatly appreciated.
Thanks,
-
- Posts: 9833
- Joined: Thu Nov 26, 2015 4:08 am
Re: ULP for SPI sensors
Yes, but you'd have to bitbang the SPI bus; the RTC power domain does have an I2C peripheral but not a SPI one. Also, if you think the ULP has interrupts, I think you're way overestimating what the li'l thing can do.
Re: ULP for SPI sensors
I'm trying to evaluating the power dissipation difference between below 2 senarios:
1. Using SPI (DMA & main CPU involved) based on interrupt
2. ULP /w bitbang (monitoring a GPIO pin to minic interrupt input)
my case is sampling data around 125Hz with 64bit data for each sample(ignore the data transferring part for now). I'm expecting solution #2 should give me better result for battery life.
Since this result is critical for my project, any input/suggestion will be very appreciated. Currently I'm looking for help on:
1. Some rough number of power dissipation for above described use cases
2. a reference implementation of bitbang SPI using ULP
thanks,
1. Using SPI (DMA & main CPU involved) based on interrupt
2. ULP /w bitbang (monitoring a GPIO pin to minic interrupt input)
my case is sampling data around 125Hz with 64bit data for each sample(ignore the data transferring part for now). I'm expecting solution #2 should give me better result for battery life.
Since this result is critical for my project, any input/suggestion will be very appreciated. Currently I'm looking for help on:
1. Some rough number of power dissipation for above described use cases
2. a reference implementation of bitbang SPI using ULP
thanks,
Re: ULP for SPI sensors
125hz? Is it an accelerometer? It probably depends on a lot of use case variables but using the sensor interrupt to wake up and run a wake stub may be preferred.
Re: ULP for SPI sensors
It's a biometric sensor...but similar to a SPI accelerametor from MCU perspective.
I'm not sure how much overhead here from power-consumption perspective by using "wake-up MCU for a wake-up stub, and go to deep-sleep right-way". My use case will run this sampling procedure 24hours continuously...so really expect to reduce this power consumption as much as possible.
I'm not sure how much overhead here from power-consumption perspective by using "wake-up MCU for a wake-up stub, and go to deep-sleep right-way". My use case will run this sampling procedure 24hours continuously...so really expect to reduce this power consumption as much as possible.
Re: ULP for SPI sensors
Interesting. What is the duty cycle? Sampling at 125hz for x seconds every y seconds. What will the WiFi be used for? How big is the battery?
Re: ULP for SPI sensors
Keep sampling 125Hz for every second...my plan is to wake up MCU to do data processing and transmission every a few minutes. Planned battery is < 500mAh. I need to find out how many days this system can can continuously work.
Re: ULP for SPI sensors
2 min worth of samples is over 100kbyte where are you going to put it? Seems like you'll be lucky to get 2 days.
Re: ULP for SPI sensors
I need help on toggling GPIO pins through ULP program. Who can point me an existing example? or help give shed some lights here? Thanks
Who is online
Users browsing this forum: No registered users and 130 guests