Search found 35 matches

by e2738729
Thu Mar 21, 2019 2:07 am
Forum: General Discussion
Topic: How to introduce sequential tasks using xEventgroupSync()
Replies: 4
Views: 5743

Re: How to introduce sequential tasks using xEventgroupSync()

Thank you for your reply. I was wondering if I can have a task that happens after another task a specific amount of time (ticks). I read through the documentation of the xEventGroupSync and it appears to me that I am not able to do so. Is there a way that I can achieve this? For example, the sending...
by e2738729
Mon Mar 18, 2019 2:16 pm
Forum: General Discussion
Topic: How to introduce sequential tasks using xEventgroupSync()
Replies: 4
Views: 5743

How to introduce sequential tasks using xEventgroupSync()

Hi everyone, I am planning to use EventGroup to synchronize between 2 tasks: one is to send data over TCP/IP and the other is to receive data from PC over TCP/IP. My question is: 1. Should I use xEventGroupSync() for this? And how can I set this up? 2. If not, can I use vTaskSuspend? What about bina...
by e2738729
Wed Mar 13, 2019 5:08 pm
Forum: ESP-IDF
Topic: Tasks synchronization for TCP/IP sending and receiving data
Replies: 0
Views: 3031

Tasks synchronization for TCP/IP sending and receiving data

Hi everyone, I am currently working on a project that involves a PC as a TCP/IP client and 12 ESP32's as TCP/IP Server. My goal is to have the ESP32's collect data from an ADC via SPI, then send those data to the PC. The PC will use multiprocessing to collect and process these data and send a comman...
by e2738729
Wed Mar 06, 2019 2:34 pm
Forum: Hardware
Topic: SPI Communication Rate of ESP32
Replies: 0
Views: 2049

SPI Communication Rate of ESP32

Hi everyone, I am currently using ESP32-thing from Sparkfun and I wonder whether this microcontroller can handle upto 20MHz of SPI clock speed without any modification? The project is that I need to daisy chain 4 DDC232's from TI together. This ADC chip has 32 input channels at 20-bit resolution. Th...
by e2738729
Fri Mar 01, 2019 3:14 am
Forum: Hardware
Topic: Polling SPI Inside Timer Interrupt
Replies: 4
Views: 5747

Re: Polling SPI Inside Timer Interrupt

Thanks for your suggestions. I had my code working now. I am planning to publish my code on github for ESP32 data collection with ADS1256 ADC chip from TI and send the data to the PC over WIFI.
by e2738729
Wed Feb 27, 2019 3:36 pm
Forum: Hardware
Topic: Polling SPI Inside Timer Interrupt
Replies: 4
Views: 5747

Re: Polling SPI Inside Timer Interrupt

Thank you for your reply. So in a nutshell the following is the structure of the SPI call based on your suggestion: 1. We create a timer interrupt to take care of the timing 2. The interrupt will trigger xemaphoreGiveFromISR and hand over a task that runs SPI 3. The task will keep checking if(xSemap...
by e2738729
Wed Feb 27, 2019 3:23 am
Forum: Hardware
Topic: DMA vs NO-DMA for SPI Communication
Replies: 3
Views: 5373

Re: DMA vs NO-DMA for SPI Communication

Thank you for your reply. In my case, since I have to mux through each channel of the ADC using SPI commands, and each time I only collect 4 bytes (24 bits to be exact) and the sampling rate is 500Hz, I guess DMA will not be useful for me.
by e2738729
Wed Feb 27, 2019 3:18 am
Forum: Hardware
Topic: Polling SPI Inside Timer Interrupt
Replies: 4
Views: 5747

Polling SPI Inside Timer Interrupt

Hi everyone, I have a conceptual question that hopefully you could help me figure out. I am not sure sharing my codes is a good idea since it spans 3 C files and 3 H files. But anyway here is the symptom: I have a timer interrupt that runs at 500 Hz. Whenever I have a SPI polling program inside the ...
by e2738729
Tue Feb 26, 2019 3:57 am
Forum: Hardware
Topic: DMA vs NO-DMA for SPI Communication
Replies: 3
Views: 5373

DMA vs NO-DMA for SPI Communication

Hi everyone, I read the IDF documentation on SPI Master and I was confused about the use of DMA. Under Speed and timing consideration, both Non-DMA Interrupt and Polling are faster than DMA driven Interrupt and Polling. So what is really the purpose of DMA in this context? Doesn't DMA free the CPU t...
by e2738729
Tue Feb 26, 2019 3:13 am
Forum: Hardware
Topic: ADS1256 with ESP32 idf
Replies: 3
Views: 7068

Re: ADS1256 with ESP32 idf

Sorry for the late reply and thank you very much for the reply. I was able to make ADS1256 to work with my ESP32 but I the latency between SPI transactions is very large. The below is my code: // Works with all 4 channels, make sure to tie CS LOW properly #include <stdio.h> #include <stdlib.h> #incl...