Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ChrRudel opened this issue Jul 31, 2024 · 1 comment

Comments

@ChrRudel
Copy link

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

@nitindeshpande
Copy link
Collaborator

Thanks for reporting @ChrRudel. Will have this fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants