Hi all!
I've setup a program which reads incoming data over the SPI Slave Interface and saves all the received data to a file on a connected SD card once the buffer which is being written to is full. The received data is in the form of an incrementing counter.
The problem which I'm observing is that some data being transmitted over SPI from the host is being lost during the first 34 seconds of the program running. After those 34 seconds have elapsed, I can find no missing data in the data saved in the SD card.
I can't make sense of why this is happening. The SPI Slave task is the only task running on core 0, while the task responsible for handling the SD card is running on core 1.
Are there any background functions which are running on core 0 in those 34 seconds after the ESP32 is initialized?
SPI Slave - Missing data during the first few seconds after initialization
Re: SPI Slave - Missing data during the first few seconds after initialization
Timer tasks, lwip tasks, IDLE etc.Are there any background functions which are running on core 0 in those 34 seconds after the ESP32 is initialized?
But I suspect that the problem is closer to home. Maybe power to SD, your buffering, one of your tasks blocking?
I have done a fair amount of SD logging & no start up issues (so far)!
& I also believe that IDF CAN should be fixed.
Re: SPI Slave - Missing data during the first few seconds after initialization
If the problem was coming from those tasks, wouldn't the problem persist beyond those 34 seconds? I've run tests for an hour with the same results. It does seem to be something to do with initialization.
Could it be that there is some conflict initially between the SDMMC host and the VSPI peripheral I'm using for the SPI Slave?
Could it be that there is some conflict initially between the SDMMC host and the VSPI peripheral I'm using for the SPI Slave?
Re: SPI Slave - Missing data during the first few seconds after initialization
Hi,
Please show the libraries etc that you are using. Maybe some source?
I have used SPI SD (not SDMMC). I produced a SPI SD qualifcation test & that ran for ages whilst shaked n baked.
I had to write my own SD driver based on ANO library. I did look for out of box but found a lot of buggy Ardunio code. Maybe thats your issue?
I am not saying that the problem is in 'those' tasks. Rather that 'those' tasks are running.
All I can suggest is that you produce a simple worked example and post.
The WROOVER has SD and SPI (?). Maybe an example based on would allow others to repeat?
Please show the libraries etc that you are using. Maybe some source?
I have used SPI SD (not SDMMC). I produced a SPI SD qualifcation test & that ran for ages whilst shaked n baked.
I had to write my own SD driver based on ANO library. I did look for out of box but found a lot of buggy Ardunio code. Maybe thats your issue?
I am not saying that the problem is in 'those' tasks. Rather that 'those' tasks are running.
All I can suggest is that you produce a simple worked example and post.
The WROOVER has SD and SPI (?). Maybe an example based on would allow others to repeat?
& I also believe that IDF CAN should be fixed.
Who is online
Users browsing this forum: Bing [Bot] and 132 guests