Skip to content

JTAG breaks when CH422G is initialized #249

@Migraine-42

Description

@Migraine-42

This is the line of code that breaks it:

if (config.stage_callbacks[BoardConfig::STAGE_CALLBACK_PRE_EXPANDER_BEGIN] != nullptr) {
ESP_UTILS_LOGD("IO expander pre-begin");
ESP_UTILS_CHECK_FALSE_RETURN(
config.stage_callbacksBoardConfig::STAGE_CALLBACK_PRE_EXPANDER_BEGIN, false,
"IO expander pre-begin failed"
);
}

// this line is the culprit
ESP_UTILS_CHECK_FALSE_RETURN(io_expander->begin(), false, "IO expander begin failed");

    if (config.stage_callbacks[BoardConfig::STAGE_CALLBACK_POST_EXPANDER_BEGIN] != nullptr) {
        ESP_UTILS_LOGD("IO expander post-begin");
        ESP_UTILS_CHECK_FALSE_RETURN(
            config.stage_callbacks[BoardConfig::STAGE_CALLBACK_POST_EXPANDER_BEGIN](this), false,
            "IO expander post-begin failed"
        );
    }

I have only use the Arduino IDE. To isolate the bug I put a delay( 10000 ) in the beginning of my script. I can hear the ping when I plug in my usb cable and hear it again when I pull it out. If break at the culprit line and step over it, I can hear the disconnect ping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions