Skip to content

PORT_EXIT_CRITICAL is not executed. #6

Closed

Description

@nopnop2002

The issue

PORT_EXIT_CRITICAL is executed only when the result is ESP_OK.

If an error occurs in dht_fetch_data, it will remain critical.

    PORT_ENTER_CRITICAL();
    esp_err_t result = dht_fetch_data(sensor_type, pin, data);
#if 0
    if (result == ESP_OK)
        PORT_EXIT_CRITICAL();
#endif
    PORT_EXIT_CRITICAL();

Which SDK are you using?

esp-idf

Which version of SDK are you using?

ESP-IDF v5.5.3-dirty

Which build target have you used?

  • esp32
  • esp32s2
  • esp32s3
  • esp32c2
  • esp32c5
  • esp32c6
  • esp32c61
  • esp32h2
  • esp32p4
  • esp8266
  • other

Component causing the issue

dht

Anything in the logs that might be useful for us?

Additional information or context

No response

Confirmation

  • This report is not a question nor a request for drivers.

Activity

  1. nopnop2002 commented on May 27, 2026

    @nopnop2002
    Author

    I missed this.

    dht/dht.c

    Line 99 in f26b936

    PORT_EXIT_CRITICAL(); \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions