I have been given the requirement to add data logging onto a SPI flash.
I cannot easily use the master FLASH as I also need to use the PSRAM.
The ESP32 spi flash library is only intended for use with the master (the program) FLASH.
I thought that a little cut n paste would resolve but the driver disappears under the hood when making use of ROM routines.
Does anyone one know of a decent SPI flash driver available on a permissive license (not GPL)?
I only need simple block access ATM.
SPI flash driver
SPI flash driver
& I also believe that IDF CAN should be fixed.
Re: SPI flash driver
Awesome; you even guessed my chip/size! I'll get testing!
& I also believe that IDF CAN should be fixed.
Re: SPI flash driver
Please note that ExtFlash does not initialise 'is_qpi' & this can give you performance issues or errors depending on what you want!
& I also believe that IDF CAN should be fixed.
Re: SPI flash driver
It seems that WiFive understands your question, but I'm confused. I'm assuming that "master FLASH" is the flash used to hold the application and other things. Why can you not use that flash for data storage? And what does PSRAM have to do with the problem you are having?I cannot easily use the master FLASH as I also need to use the PSRAM.
John A
Re: SPI flash driver
Hi,
The issue was the lack of a 'is_qpi' initialiser in the downloaded driver.
Gonna try -Weffc++ and start coding properly.
To answer your questions - my understanding is that I must be running from IRAM in order to write main/master FLASH -
' This means that both CPUs must be running code from IRAM and only reading data from DRAM while flash write operations occur.'
From the above I understand that when writing main FLASH; (a) I must be running in IRAM and (b) cannot write to PSRAM
My program is quite large (>> larger than IRAM) and needs to ensure low latency for a number of activities including writing to PSRAM. I expect that FLASH erase/writes will take 10mS or more and so these restrictions seem to make main FLASH use impractical for me.
Perhaps 'cannot' is not strictly true but using main FLASH for logging seems to be a pain.
The issue was the lack of a 'is_qpi' initialiser in the downloaded driver.
Gonna try -Weffc++ and start coding properly.
To answer your questions - my understanding is that I must be running from IRAM in order to write main/master FLASH -
' This means that both CPUs must be running code from IRAM and only reading data from DRAM while flash write operations occur.'
From the above I understand that when writing main FLASH; (a) I must be running in IRAM and (b) cannot write to PSRAM
My program is quite large (>> larger than IRAM) and needs to ensure low latency for a number of activities including writing to PSRAM. I expect that FLASH erase/writes will take 10mS or more and so these restrictions seem to make main FLASH use impractical for me.
Perhaps 'cannot' is not strictly true but using main FLASH for logging seems to be a pain.
& I also believe that IDF CAN should be fixed.
Who is online
Users browsing this forum: Bing [Bot] and 90 guests