Hi,
I need to do a really fast acquisition system. I have an accelerometer and I am reading its FIFO 6 times per second. I am getting an interrupt when the FIFO is full and I check a flag boolean in while(1) in app_main. My problem is that I want to print a message every time I finish to read the FIFO, but sometimes the system reads just the first interrupt and then stops... I think that the fact that I am using printf may slow it down and I would like to know how I can do the printing from the second core only and leave the first one just with reading the FIFO using SPI. Then I will have to process the data a little bit and store it in a flash memory...
Regards,
Gabriel
ESP32 dual cores application
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 dual cores application
Yes, you can, but I don't think it may actually be necessary. Start reading up on FreeRTOS queues, and instead of setting a flag, dump your data in a queue (or into an ESP-IDF ringbuffer; it may be a bit more efficient). Chances are that the queue already can buffer enough for your printf to finish working without anything overflowing.
Who is online
Users browsing this forum: Bing [Bot], letter57 and 237 guests