Skip to content

stse_platform_Crc16_Accumulate() is not safe #65

@parmi93

Description

@parmi93

From what I understand, the STSELib middleware allows managing multiple STSAFE devices at the same time through the bus_id parameter. For example, stse_platform_i2c_send_start() takes the integer bus_id as its first parameter, which can be used by the porting layer to determine which STSAFE device to communicate with (in case multiple STSAFE chips are present).

The issue is that the function stse_platform_Crc16_Accumulate() does not take the bus_id parameter, making this function unsafe for this use case, since it requires saving the CRC calculation state in a static variable, which would end up being corrupted.

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