Skip to content

Config settings are overwritten when clearStrongPullup() happens #5

@lukashove

Description

@lukashove

clearStrongPullup() is supposed to keep the current config settings and just make sure that the SPU bit is cleared. However, the bitclear is not correct and erases bits that it should not.

This usually results in all config settings getting cleared, and since this function executes within the 1-wire reset function, it becomes impossible to communicate with chips that require overdrive speed.

Currently the function writes the new config as:

void OneWire::clearStrongPullup()
{
writeConfig(readConfig() & !DS2482_CONFIG_SPU);
}

Function should instead be as follows:

void OneWire::clearStrongPullup()
{
writeConfig(readConfig() &~(1 << 2));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions