Skip to content

MSS_SYS_spi_copy() runs with wrong frequency due to issue with mailbox_reg variable definition in mss_sys_services.c #20

@ChrRudel

Description

@ChrRudel

There seems to be a bug in the HSS / bare-metal-library:
mailbox_reg needs to be declared as “volatile uint32_t * mailbox_reg;”, otherwise the read/modify/write cycle starting at line 2021 will lead to unpredictable values
In our case, this lead to the 17th byte of the MSS_SYS_SPI_COPY_CMD operation being corrupted.
This byte contains the options / clock frequency, which explains why we were seeing wrong frequencies and data corruption.

This is likely also the root cause for why this workaround is necessary:
polarfire-soc/hart-software-services@c058394

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