diff --git a/components/driver/include/driver/spi_master.h b/components/driver/include/driver/spi_master.h index f43394d3c..4e5b66f62 100644 --- a/components/driver/include/driver/spi_master.h +++ b/components/driver/include/driver/spi_master.h @@ -182,8 +182,10 @@ esp_err_t spi_bus_remove_device(spi_device_handle_t handle); * @param trans_desc Description of transaction to execute * @param ticks_to_wait Ticks to wait until there's room in the queue; use portMAX_DELAY to * never time out. - * @return + * @return * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_ERR_TIMEOUT if there was no room in the queue before ticks_to_wait expired + * - ESP_ERR_NO_MEM if allocating DMA-capable temporary buffer failed * - ESP_OK on success */ esp_err_t spi_device_queue_trans(spi_device_handle_t handle, spi_transaction_t *trans_desc, TickType_t ticks_to_wait); @@ -205,6 +207,7 @@ esp_err_t spi_device_queue_trans(spi_device_handle_t handle, spi_transaction_t * out. * @return * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_ERR_TIMEOUT if there was no completed transaction before ticks_to_wait expired * - ESP_OK on success */ esp_err_t spi_device_get_trans_result(spi_device_handle_t handle, spi_transaction_t **trans_desc, TickType_t ticks_to_wait); diff --git a/components/freertos/include/freertos/queue.h b/components/freertos/include/freertos/queue.h index 9d95ad1bb..638157765 100644 --- a/components/freertos/include/freertos/queue.h +++ b/components/freertos/include/freertos/queue.h @@ -1106,7 +1106,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; // Now the buffer is empty we can switch context if necessary. if( xHigherPriorityTaskWoken ) { - taskYIELD (); + portYIELD_FROM_ISR (); } } @@ -1177,7 +1177,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION; // Now the buffer is empty we can switch context if necessary. if( xHigherPriorityTaskWoken ) { - taskYIELD (); + portYIELD_FROM_ISR (); } } diff --git a/docs/get-started/establish-serial-connection.rst b/docs/get-started/establish-serial-connection.rst index f3e15250f..929fe1ec2 100644 --- a/docs/get-started/establish-serial-connection.rst +++ b/docs/get-started/establish-serial-connection.rst @@ -54,10 +54,12 @@ MacOS :: ls /dev/cu.* +.. _linux-dialout-group: + Adding user to ``dialout`` on Linux ----------------------------------- -The currently logged user should have read and write access the serial port over USB. This is done by adding the user to ``dialout`` group with the following command:: +The currently logged user should have read and write access the serial port over USB. On most Linux distributions, this is done by adding the user to ``dialout`` group with the following command:: sudo usermod -a -G dialout $USER diff --git a/docs/get-started/linux-setup.rst b/docs/get-started/linux-setup.rst index 3fa563a4c..1c94510e1 100644 --- a/docs/get-started/linux-setup.rst +++ b/docs/get-started/linux-setup.rst @@ -70,6 +70,12 @@ ESP32 toolchain for Linux is available for download from Espressif website: Instead of ``/home/user-name`` there should be a home path specific to your installation. +Permission issues /dev/ttyUSB0 +------------------------------ + +With some Linux distributions you may get the ``Failed to open port /dev/ttyUSB0`` error message when flashing the ESP32. :ref:`This can be solved by adding the current user to the dialout group`. + + Arch Linux Users ---------------- diff --git a/examples/bluetooth/ble_spp_client/main/spp_client_demo.c b/examples/bluetooth/ble_spp_client/main/spp_client_demo.c index 9eadc13b7..0cc082297 100644 --- a/examples/bluetooth/ble_spp_client/main/spp_client_demo.c +++ b/examples/bluetooth/ble_spp_client/main/spp_client_demo.c @@ -601,7 +601,7 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par } //the unit of the duration is second uint32_t duration = 0xFFFF; - ESP_LOGE(GATTC_TAG, "Enable Ble Scan:during time 0x%04X minutes.",duration); + ESP_LOGI(GATTC_TAG, "Enable Ble Scan:during time 0x%04X minutes.",duration); esp_ble_gap_start_scanning(duration); break; } diff --git a/examples/performance/tcp_perf/main/tcp_main.c b/examples/performance/tcp_perf/main/tcp_main.c index 1497e6150..000ed6d42 100644 --- a/examples/performance/tcp_perf/main/tcp_main.c +++ b/examples/performance/tcp_perf/main/tcp_main.c @@ -33,6 +33,7 @@ step3: #include "freertos/event_groups.h" #include "esp_log.h" #include "esp_err.h" +#include "nvs_flash.h" #include "tcp_perf.h" @@ -123,6 +124,13 @@ static void tcp_conn(void *pvParameters) void app_main(void) { + esp_err_t ret = nvs_flash_init(); + if (ret == ESP_ERR_NVS_NO_FREE_PAGES) { + ESP_ERROR_CHECK(nvs_flash_erase()); + ret = nvs_flash_init(); + } + ESP_ERROR_CHECK( ret ); + #if EXAMPLE_ESP_WIFI_MODE_AP ESP_LOGI(TAG, "EXAMPLE_ESP_WIFI_MODE_AP"); wifi_init_softap(); diff --git a/examples/performance/udp_perf/main/udp_main.c b/examples/performance/udp_perf/main/udp_main.c index d4d8b1fa9..8bbd05ff0 100644 --- a/examples/performance/udp_perf/main/udp_main.c +++ b/examples/performance/udp_perf/main/udp_main.c @@ -36,6 +36,7 @@ step3: #include "freertos/event_groups.h" #include "esp_log.h" #include "esp_err.h" +#include "nvs_flash.h" #include "udp_perf.h" @@ -102,6 +103,13 @@ static void udp_conn(void *pvParameters) void app_main(void) { + esp_err_t ret = nvs_flash_init(); + if (ret == ESP_ERR_NVS_NO_FREE_PAGES) { + ESP_ERROR_CHECK(nvs_flash_erase()); + ret = nvs_flash_init(); + } + ESP_ERROR_CHECK( ret ); + #if EXAMPLE_ESP_WIFI_MODE_AP ESP_LOGI(TAG, "EXAMPLE_ESP_WIFI_MODE_AP"); wifi_init_softap();