IDE Detection Issues - #8
Open
infusixllc wants to merge 2 commits into
Open
Conversation
…possibly invalid register write.
Member
|
I just hit the same problem. I wanted to boot from the SD card, and EmuTOS froze. I was already investigating the EmuTOS sources when I read your post on the ACP forum. You saved me a lot of time, thanks! :-) The diagnosis is correct, but I think the solution should be different. According to this line: Line 50 in 7e9dfc5 The speed should be negative when the drive is not responding. Therefore, the problem is that the speed value should be masked with 0xF before being written to the register. I have tested this approach, and it works here. |
Member
|
It should be fixed with commit 59fae74 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My Firebee has failed bus transceiver that goes to CF/IDE.
The issue that is happening is similar whether this transciever is currently failing or if the CF card is just unplugged.
It starts when the IDE register is read. pio_cycle_time is detected, on my firebee this comes back -16 due to a failed IDE bus trasceiver. A similar situation happens when the card is unplugged as it instead just returns 0 when something times out.
In either case the get_speed function returns -1. In the parent function this causes one or both higher bits to be written when setting speed. Bits 16-17 or 20-21 of F0040000 should be written with 0-3 only as in Fredi BaS but instead due to the negative return causes the higher bits to be written.
For unknown reasons this causes dramatic interrupt failures on my firebee. The MFP registers read 0 when read and the system locks. What are the meaning of the higher bits and how do they cause the failure? I don't know.
But this PR fixes the issue. Needs to be checked against Firebees with working IDE/CF.