Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion components/stm_pro_mode/include/stm_pro_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
#define LOW 0

#define ACK 0x79
#define SERIAL_TIMEOUT 5000
// You may needs to increase this delay, on some chip with bigger flash memory it may takes some time to erase
// over 8s in my case.
#define SERIAL_TIMEOUT 15000

#define FILE_PATH_MAX 128
#define BASE_PATH "/spiffs/"
Expand Down
11 changes: 9 additions & 2 deletions components/stm_pro_mode/stm_pro_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,21 @@ int waitForSerialData(int dataCount, int timeout)
{
int timer = 0;
int length = 0;
while (timer < timeout)

int ticks = pdMS_TO_TICKS(timeout);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laukik-hase is this method available in the IDF version we used?

// Minimum one ticks
if (ticks == 0)
ticks = 1;

while (timer < ticks)
{
uart_get_buffered_data_len(UART_CONTROLLER, (size_t *)&length);
if (length >= dataCount)
{
return length;
}
vTaskDelay(1 / portTICK_PERIOD_MS);

vTaskDelay(1);
timer++;
}
return 0;
Expand Down
2 changes: 2 additions & 0 deletions examples/file_serving_stm/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv"

CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024