Comments (7)
I'm not sure if RomWBW handles SDCard "hot plug", and whether the OS can remain running through that. But, if the driver does not always return the CSIO to full speed it could cause problems for the other device.
from romwbw.
RomWBW does handle hot plugging of SD Cards during a live OS. There are some constraints depending on the OS. For example, CP/M 2.2 requires you to be at the command prompt and use restart (ctrl-C) after plugging it in.
You are absolutely correct about generic initialization of the CSIO interface. Since the use of a Z180 implies that a CSIO exists, the CSIO can and should be initialized regardless of devices using it. I will do something about this very shortly, but may be tomorrow.
Obviously, the CSIO should be initialized to either low or high speed at startup and any driver that uses CSIO should adjust the speed as needed, but leave it restored to the default speed. I guess you are suggesting that high speed be the default since that would mean less instances of the drivers needing to change the speed. The drivers would just lower the speed during the device initialization process (if needed by the device). All of the CSIO drivers will need to abide by the convention, but I'm not ready to create an API for the CSIO at this point.
Thanks!
Wayne
from romwbw.
Yeah, good point(s). I'll talk to the CP/NET CSIO developer about saving the current speed, forcing high-speed, then restoring the previous speed. That's probably the right thing to do.
We ran into problems with slow speed because, it appears, that the CSIO transmit actually clears TE before the last bit gets sent. Our code checks TE before turning off chip-select, and at slow speed it ends up truncating the transfer because the last bit was not completed. I did not dig into this area of your code, but was wondering if you had seen this issue and handled it.
from romwbw.
Yeah, good point(s). I'll talk to the CP/NET CSIO developer about saving the current speed, forcing high-speed, then restoring the previous speed. That's probably the right thing to do.
I like this approach. Since the Z180 registers are all readable, any driver can get and save the state at function entry and restore at exit.
We ran into problems with slow speed because, it appears, that the CSIO transmit actually clears TE before the last bit gets sent. Our code checks TE before turning off chip-select, and at slow speed it ends up truncating the transfer because the last bit was not completed. I did not dig into this area of your code, but was wondering if you had seen this issue and handled it.
Yes!!! This also burned me at one point. In the sd.asm code, you will see a small delay function after many of the "WAIT_TX" calls. It is for this exact reason. This is challenging my memory, but I believe that the issue only existed on one one of the two variants of the chip. I think I only had to add the delay when dealing with the Rev. K chips. However, for safety, the delay is used regardless.
from romwbw.
Just checked in (dev branch) an update that initializes the Z180 CSIO at system startup. A constant called Z180_CNTR_DEF has been created to hold the default value. This value can be used by drivers to restore the default value after modification. The sd.asm driver still needs to be updated to set and restore the CNTR register as needed.
@durgadas311 The current default value is the slowest speed available for the CSIO. Is this OK?
-Wayne
from romwbw.
I think that will be fine. For CP/NET, this code will have already been run so it should just save the current value and restore it after.
from romwbw.
Thanks Douglas. Based on your feedback, I will close this issue. I will put the corresponding changes to sd.asm on the todo list, but those changes won't really affect your work based on the current approach.
Thanks again for all of your help with this.
-Wayne
from romwbw.
Related Issues (20)
- configuring order of serial port detection / assignment HOT 2
- z180 - illegal opcode trap handler HOT 15
- RC2014 with SM Baker SIO-2 and CTC cards HOT 3
- CP/M 3 cpm2date Function Not Implemented HOT 1
- Question - ACIA & bugfixes in pre.50 & pre.55 HOT 8
- Getting a lot of build errors on CYGWIN HOT 11
- build errors on Lubuntu HOT 52
- CLRDIR does not wait for response HOT 16
- tasm not found when building dev under windows HOT 6
- Build fail HOT 6
- DDTZ and ZSID on z80 in interrupts running. HOT 18
- 3.1.1 UNA_std.rom fails on Mark IV HOT 2
- (Q) A new Release? HOT 7
- (Q) - freeRTOS context switch qualification HOT 4
- v3.0.1 Hangs before boot loader prompt HOT 13
- 3.0.0 does not compile on linux HOT 3
- CPM Tools HOT 2
- RomWBW Digital I/O Input at Startup HOT 9
- Survey.com HOT 19
- Multiple floppy drives with multiple media formats HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from romwbw.