Hi,
i wrote a program that uses i2s 8bit parallel single channel in lcd mode.Data transfered with DMA. Now i want to use psram because internal ram of the esp32 is not enough. But psram could not use for a DMA allocation.
How can i use i2s to transfer data from psram?
ıf psram can be used without DMA, how can i use it?
Thank you all in advance.
using i2s with psram
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: using i2s with psram
Sorry, external memory can't be used for DMA on the ESP32. (It will be in future chips; I don't recall if the -S2 can already do that.) You need to add a buffer in internal memory that is DMA'able, and use memcpy to move data from/to that buffer, then use I2S to read from that buffer.
Re: using i2s with psram
Can i use i2s without DMA
Re: using i2s with psram
I2C does not need DMA.
Obviously things get a bit more tricky CPU performance, latency & interrupts etc wise if you do not DMA.
Can I ask why you think you do not have enough internal memory? My understanding is that even task stacks may be placed in PSRAM now which allows you to have pretty much all the ESP SRAM. That would seem preferable over not using DMA and then other interrupts etc taking a slice out of your non DMA I2C.
That said I have not looked hard at the ESP buses & especially how other peripheral DMA might affect.
Obviously things get a bit more tricky CPU performance, latency & interrupts etc wise if you do not DMA.
Can I ask why you think you do not have enough internal memory? My understanding is that even task stacks may be placed in PSRAM now which allows you to have pretty much all the ESP SRAM. That would seem preferable over not using DMA and then other interrupts etc taking a slice out of your non DMA I2C.
That said I have not looked hard at the ESP buses & especially how other peripheral DMA might affect.
& I also believe that IDF CAN should be fixed.
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: using i2s with psram
Peter: The subject is I2S here, not I2C.
trapozac: There is no documented way to have I2S not use DMA. Suggest you use the copy-to-internal-memory trick I suggested.
trapozac: There is no documented way to have I2S not use DMA. Suggest you use the copy-to-internal-memory trick I suggested.
Who is online
Users browsing this forum: Baidu [Spider] and 93 guests