Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp32c2 hosted for NG on spi interface, restart abnormaly when run wget #557

Open
3 tasks done
WindWard-atm opened this issue Dec 26, 2024 · 14 comments
Open
3 tasks done

Comments

@WindWard-atm
Copy link

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Provided a clear description of your suggestion.
  • Included any relevant context or examples.

Issue or Suggestion Description

esp32c2 work in linux system on spi interface ,restart abnormaly when run 3 wget apps
IDF commit: e7771c75bd1dbbfb7b3c5381be7e063b197c9734
application commit : 0ee257d

image

Serial-COM82_2024-12-25_18-42-09-984.log

@mantriyogesh
Copy link
Collaborator

This is due to C2 low memory. We need to fix this.

@mantriyogesh
Copy link
Collaborator

@kapilkedawat ++

@WindWard-atm
Copy link
Author

This is due to C2 low memory. We need to fix this.

waiting for your update

@WindWard-atm
Copy link
Author

This is due to C2 low memory. We need to fix this.

any news?

@mantriyogesh
Copy link
Collaborator

Hello @WindWard-atm ,

I apologise for the delay. Let me come back on this today.

@mantriyogesh
Copy link
Collaborator

@kapilkedawat , were we able to test and reproduce this ?

@kapilkedawat
Copy link
Contributor

kapilkedawat commented Jan 6, 2025

Hi @WindWard-atm, please apply this patch and see if you still face any crash after that. Please note that you need to clean and then rebuild the firmware for this to apply properly.

diff --git a/esp_hosted_ng/esp/esp_driver/network_adapter/sdkconfig.defaults.esp32c2 b/esp_hosted_ng/esp/esp_driver/network_adapter/sdkconfig.defaults.esp32c2
index 519e7abc..29d8aae0 100644
--- a/esp_hosted_ng/esp/esp_driver/network_adapter/sdkconfig.defaults.esp32c2
+++ b/esp_hosted_ng/esp/esp_driver/network_adapter/sdkconfig.defaults.esp32c2
@@ -30,10 +30,13 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.esp32c2.csv"
 CONFIG_ESP_SPI_RX_Q_SIZE=6
 CONFIG_ESP_SPI_TX_Q_SIZE=6
 
-CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=14
+CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=6
 CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=18
 CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=18
 CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y
-CONFIG_ESP_WIFI_TX_BA_WIN=16
+CONFIG_ESP_WIFI_TX_BA_WIN=6
 CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
-CONFIG_ESP_WIFI_RX_BA_WIN=16
+CONFIG_ESP_WIFI_RX_BA_WIN=6

@WindWard-atm
Copy link
Author

Hi @WindWard-atm, please apply this patch and see if you still face any crash after that. Please note that you need to clean and then rebuild the firmware for this to apply properly.

diff --git a/esp_hosted_ng/esp/esp_driver/network_adapter/sdkconfig.defaults.esp32c2 b/esp_hosted_ng/esp/esp_driver/network_adapter/sdkconfig.defaults.esp32c2
index 519e7abc..29d8aae0 100644
--- a/esp_hosted_ng/esp/esp_driver/network_adapter/sdkconfig.defaults.esp32c2
+++ b/esp_hosted_ng/esp/esp_driver/network_adapter/sdkconfig.defaults.esp32c2
@@ -30,10 +30,13 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.esp32c2.csv"
 CONFIG_ESP_SPI_RX_Q_SIZE=6
 CONFIG_ESP_SPI_TX_Q_SIZE=6
 
-CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=14
+CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=6
 CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=18
 CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=18
 CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y
-CONFIG_ESP_WIFI_TX_BA_WIN=16
+CONFIG_ESP_WIFI_TX_BA_WIN=6
 CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
-CONFIG_ESP_WIFI_RX_BA_WIN=16
+CONFIG_ESP_WIFI_RX_BA_WIN=6

I had try as above,but the result is the same
image

@mantriyogesh
Copy link
Collaborator

@WindWard-atm Can you please state

  1. did you do run first line or similar?
rm -rf sdkconfig build
idf.py set-target esp32c2
idf.py flash monitor
  1. the git commit at esp and host (both sides)?
  2. sdkconfig generated in esp32c2 side?

@mantriyogesh
Copy link
Collaborator

@WindWard-atm ?

@WindWard-atm
Copy link
Author

@WindWard-atm ?

I apologise for the delay,
did you do run first line or similar? yes
sdkconfig generated in esp32c2 side ? yes
the git commit at esp and host (both sides)? which commit ?

after I re-remove and re-compile ,it run normal without crash, but the speed changes slowly, about 130kpbs

@mantriyogesh
Copy link
Collaborator

C2 max speeds are limited because of small on chip memory. Do you need bluetooth? If not bluetooth could be disabled and put in sdkconfig.defaults.esp32c2.

This would release some memory for the help.

Then increase the config that you just reduced.

@kapilkedawat
Copy link
Contributor

kapilkedawat commented Jan 13, 2025

@WindWard-atm there shouldn't be any drastic difference in total throughput on these numbers. Could you share your before and after numbers? Also what's your SPI speed?

@WindWard-atm
Copy link
Author

it restart abnormaly again after 3 hours, before is 15 minutes
my diff:
image

spi speed is 30MHz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants