I guess we've posted the reply at the same time
From what I see using native VSPI pins seem to get the write methods to work, but changing the SPI via GPIO MUX yields the same results that I was posting. Hmm...m
External flash component
Re: External flash component
Changing the speed from 40 to 20 produces good results:
I should have suspected that from the beginning, but my aging grey matter ain't what it used to be.
Must have something to do with the 26MHz "limit" when going through the GPIO matrix. But, comments in the SPI code seem to indicate that's only if using full-duplex comms, which we are not using.
Will experiment further.
Code: Select all
.speed_mhz = 20,
Code: Select all
ERASE/WRITE/VERIFY Test...
Bus
std 1-1-1
Flash size 16777216
Sector size 4096
Register 1 result binary = 00000010
Register 1 result decimal = 2
Register 2 result binary = 00111100
Register 2 result decimal = 60
Erase error code: 0
Must have something to do with the 26MHz "limit" when going through the GPIO matrix. But, comments in the SPI code seem to indicate that's only if using full-duplex comms, which we are not using.
Will experiment further.
Re: External flash component
Nope, can't seem to get speed above 20MHz to work when going through the GPIO matrix. When using native pins, I can go all the way to 80MHz.
hgptamn, if you're still watching, can you try reducing the speed to 20 and test again?
hgptamn, if you're still watching, can you try reducing the speed to 20 and test again?
- Vader_Mester
- Posts: 300
- Joined: Tue Dec 05, 2017 8:28 pm
- Location: Hungary
- Contact:
Re: External flash component
Illucius: I'll try to check your program again later, I need some resoldering, my CS wire came off
Code: Select all
task_t coffeeTask()
{
while(atWork){
if(!xStreamBufferIsEmpty(mug)){
coffeeDrink(mug);
} else {
xTaskCreate(sBrew, "brew", 9000, &mug, 1, NULL);
xSemaphoreTake(sCoffeeRdy, portMAX_DELAY);
}
}
vTaskDelete(NULL);
}
Re: External flash component
Sorry for the late response; I was out of country for the last week and didn't have the ESP32 with me.
I don't see how that bug got past me; I was very well aware of GPIO MUX frequency limitations...
I will check it right away and post an update.
Update 1: I'm getting some strange results; Once I sort out why so, I'll post another update.
Update 2: Apparently setting the SPI frequency to 20MHz still doesn't solve the issue, but fixes wrong register settings for register 1 and 2.
I don't see how that bug got past me; I was very well aware of GPIO MUX frequency limitations...
I will check it right away and post an update.
Update 1: I'm getting some strange results; Once I sort out why so, I'll post another update.
Update 2: Apparently setting the SPI frequency to 20MHz still doesn't solve the issue, but fixes wrong register settings for register 1 and 2.
Code: Select all
ERASE/WRITE/VERIFY Test...
Bus
std 1-1-1
Flash size 8388608
Sector size 4096
Erase error code: 0
Write error code: 0
Read error code: 0
addr = 0
erase/write/verify failed at block 0 offset 0
unaliged write successful
dual 1-1-2
Flash size 8388608
Sector size 4096
Erase error code: 0
Write error code: 0
Read error code: 0
addr = 0
erase/write/verify failed at block 0 offset 0
unaliged write successful
dio 1-2-2
Flash size 8388608
Sector size 4096
Erase error code: 0
Write error code: 0
Read error code: 0
addr = 0
erase/write/verify failed at block 0 offset 0
unaliged write successful
quad 1-1-4
Flash size 8388608
Sector size 4096
Erase error code: 0
Write error code: 0
Read error code: 0
addr = 0
erase/write/verify failed at block 0 offset 0
unaliged write failed
qio 1-4-4
Flash size 8388608
Sector size 4096
Erase error code: 0
Write error code: 0
Read error code: 0
addr = 0
erase/write/verify failed at block 0 offset 1
unaliged write failed
qpi 4-4-4
Flash size 8388608
Sector size 4096
Erase error code: 0
Write error code: 0
Read error code: 0
addr = 0
erase/write/verify failed at block 0 offset 1
unaliged write failed
Done...
Re: External flash component
@Veder_Mester
Did your experiments show better results?
Did your experiments show better results?
- Vader_Mester
- Posts: 300
- Joined: Tue Dec 05, 2017 8:28 pm
- Location: Hungary
- Contact:
Re: External flash component
Not yet, but I try. My problem is that my flash is actually a Winbond chip, but I check it further, when I find some time.
If you have updated anything in the code, please post it so I can see.
Vader[BEN]
If you have updated anything in the code, please post it so I can see.
Vader[BEN]
Code: Select all
task_t coffeeTask()
{
while(atWork){
if(!xStreamBufferIsEmpty(mug)){
coffeeDrink(mug);
} else {
xTaskCreate(sBrew, "brew", 9000, &mug, 1, NULL);
xSemaphoreTake(sCoffeeRdy, portMAX_DELAY);
}
}
vTaskDelete(NULL);
}
Who is online
Users browsing this forum: No registered users and 21 guests