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

MPFS RTC bugfix #530

Closed
Eoin-Dickson opened this issue Oct 11, 2023 · 1 comment
Closed

MPFS RTC bugfix #530

Eoin-Dickson opened this issue Oct 11, 2023 · 1 comment

Comments

@Eoin-Dickson
Copy link

Description

Firstly the MPFS RTC peripheral has a timeToUpload of 01/01/2000 in the specification. Currently this value is not initialized so takes the default value of 01/01/0000 this is incorrect and causes for a calculation later result in a value greater than the 16bits allocated for it.

Secondly the upload bit in the control register needs to have a readback value as in the specifications. This value will read 0 if the value on upload completion.

Expected behaviour

The timeToUpload should be initialized to 01/01/2000 at the beginning and whenever the RTC is reset it should reset the timeToUpload to 01/01/2000 . This will prevent any calculation from being too large for its allocated storage.

Upon the upload of a count to the RTC the readback to the upload bit in the control register should return 0 to validate that the count value was uploaded correctly.

How to reproduce?

I have tested using an example project and it will throw an error due to the larger value being allocated to a 16bit register.

Environment

Windows
Renode 1.14.0

Do you plan to address this issue and file a PR?

Yes, I will create a PR for this issue

@JanOlencki
Copy link
Contributor

Hi @Eoin-Dickson

Thank you for your contribution. Your PR (renode/renode-infrastructure#87) has been merged upstream.

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