RetroBSD
http://retrobsd.org/

SDRAM based board - a prototype run - any interest on it?
http://retrobsd.org/viewtopic.php?f=3&t=5004
Page 6 of 11

Author:  majenko [ Sat Nov 24, 2012 10:15 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

For P's I tend to use these: http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=9103511 controlled by one of these: http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=1757986

This is the circuit I usually use:
Attachment:
PFetSwitch.png
PFetSwitch.png [ 40.08 KiB | Viewed 12400 times ]

Reduce the mosfet pull-up resistor if you want faster switching.

Incidentally, the NPN I use (listed above) has a 10KΩ base resistor built in, so you can loose the base resistor from the circuit - saves a component...

I find it a good combination, but there is probably a better one you can more efficiently directly drive with 3.3V.

I am doing work with getting hot-swap working in the partition branch (http://retrobsd.org/viewtopic.php?f=5&t=5009) and we need some way of isolating the SD card that's going to be removed - powering it off is probably the best way - but it'd only really be needed on the secondary slot - the primary should never be removed, or the OS will crash. But then, there is nothing to say which is the primary and which is the secondary - you could boot off either - so maybe having it on both would be best.

Author:  madscifi [ Sat Nov 24, 2012 10:24 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

If you can reliably hotswap on a single SPI port (without pausing anything) then there is no value in using a second SPI port.

I stopped testing it and have been working on the general crash problem. I have been running swap on the new sdram configuration without problems while working on the crash problem.

Moving the resistor from WE# (pullup) to CKE (pulldown) would make sense, I think. Leave the pullup on CE#. That would be my suggestion, anyway.

Author:  Pito [ Sun Nov 25, 2012 11:08 am ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Add 1meg resistors from sdcard's /cs to ground (sdcard device detection).
The pullups on cs/ are optional (leave them there, when using above trick do not populate them)..

Author:  wiz [ Sun Nov 25, 2012 8:52 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi All,

I would favor power up/down for both SDs as well as seperate pins to drive each. Hot swap only works for SD if ALL pins are less that 1/2 volt or so. So pullups should be to SD power not system cpu power!

2nd card could not be driven by its own SPI maybe? Do we have enough SPI ports?

Ideally RetroBSD tries to boot drive A and failing that tries drive B. So if drive A gets hot removed, the system eventually recovers and resumes running. Maybe a big order right now?

Other uses for 2nd drive seem to me to be. Image copying whole RetroBSD system. Writiing and reading MSDOS stuff on 2nd drive. Maybe multiple partitions. I believe this is working now in partition?

It would be nice to be able to use the unused portion of Drive A for an MSDOS compatible filesystem of some sort. We only use 16MB of 2 or 4 or 8 GB right now!

Wiz

Author:  wiz [ Sun Nov 25, 2012 9:01 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Jaromir,

Pins or pads to connect external panel mounted SD(s) (big ones) might be useful in some applications.

Board is getting pretty full :). Maybe this is on the wish list for now?

Are we tired enough to run a few boards yet :) ?

LOL

Wiz

Author:  jaromir [ Mon Nov 26, 2012 8:52 am ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

wiz,
if you wan't to unplug power of SD card, you should place all remaining signals to low level. This is not possible, if there is communication on shared SPI bus. If you simply cut the power, SD card will be powered through internal diodes on data lines.
So if we want to have VDD switch (I'm not sure about this), we should have transparent drivers on SPI with tristate outputs too.
Pullups should be powered from SD power - which one? We have two SD card, thus two power lines.

Honestly, I'm still unsure about power switch on SD power, I have feeling like it's redundant. There is no need to remove power from SD card in order to remove card. Pins on SD card, as well as sockets are made to unplug first data pins and then power pins when removing card from socket. You only need to wait for erase/write operations to finish, then you can remove card and wait for reinsertion.
We probably don't have second easily available SPI bus

Pull-downs on CS are possible, though using it for detection of SD card is somehow clunky.

I'll put SPI connector on board.

Author:  jaromir [ Mon Nov 26, 2012 10:57 am ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Well, parts around bottom connector routed.
No changes in schematics by now.

Attachments:
dr1_f.png
dr1_f.png [ 67.75 KiB | Viewed 12370 times ]

Author:  Pito [ Mon Nov 26, 2012 12:21 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Few remarks:
sdcards:
================
- could take 200mA each - pls consider that, maybe 2-3x10u ceramic each
- switch vcc - the only way how to get an sdcard from a "bad" state is to power it on/off. So the switches could be useful when we have a driver which attempts to recover the sdcard's state in case of a trouble (ie retrobsd as the board computer on a mission to Europa)
- pullups on respective vcc of course
- 1meg pull downs on /cs - you must not populate them, just make a place holder for them
- spi buffer - a single 244 can buffer two channels if needed, I would consider an external SPI channel buffered, though..

Author:  jaromir [ Mon Nov 26, 2012 12:50 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Pito wrote:
...retrobsd as the board computer on a mission to Europa

Did you mean missile?

For decoupling... OK, I'll do it a bit more powerful. Few more caps can't hurt.

I've never needed to get SD card from bad state. Maybe I'm lucky enough, but this just didn't happen.
If we will add power switches to SD cards, buffer would be definitely needed. Without buffering of signal lines, switching power is worthless - unless you put (shared) SPI lines on low level.
Now the question is - where the heck do I put the driver? There is not much space left :)
Something like 74LVX244 in TSSOP20 should do the job.

Author:  jaromir [ Mon Nov 26, 2012 1:31 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

This is something like buffer with power control.
What about this one? I think I can manage to put it on board.

Attachments:
Clipboard01.png
Clipboard01.png [ 15.46 KiB | Viewed 12363 times ]

Author:  jaromir [ Mon Nov 26, 2012 2:48 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Now this is getting really tough :evil:

I added SPI buffer and power switches. LED on 3V3 rail is there too, as fifth status LED.

Attachments:
dr1_g.png
dr1_g.png [ 67.71 KiB | Viewed 12361 times ]

Author:  wiz [ Mon Nov 26, 2012 3:12 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Jaromir,

Layout getting tough => Time to make PCBs !!

Looks *VERY* good to me :). You are a gifted PCB layout person. I got Eagle 5.11 free running here. Maybe I can load your PCB? Maybe even edit it? Haven't used Eagle for real stuff yet.

Not sure whether you plan a silk screen? Maybe not necessary?

If you do. I would mark connector pins with their CPU pin and if room their Port designation.

i.e.- P5-RA14 Pin 5 Port (Register) A bit 15. I think the Arduino insanity of labeling pins with their 'logical' (illogical?) names only confuses real engineers. Just my humble opinion :).

Can't wait until all of us see and can play with real PCBs.

Dusting off my ethernet plugin. Maybe I can get it to work in/under RetroBSD?

Wiz

Author:  wiz [ Mon Nov 26, 2012 3:22 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Jaromir,

SD cards from bad state?

In running RetroBSD: unplug SD and plug it back in. RetroBSD 'should' recover gracefully and keep running. VERY few systems are even capable of doing this. RetroBSD is NOT yet able to tolerate this kind of abuse.

Or to make it a better test. Unplug good SD, replace with bad SD, remove bad SD and reinsert good SD. System should gracefully pick up the pieces and resume running :). I don't know of ANY systems that can do this!

One of my SD interfaces has power up/down control and my prototype MSDOS PIC32 driver leaves power off on the 2nd SD and only tuns it on when accessed. Works VERY well :). If the SD has a valid filesystem it mounts and can read/write to it. If the SD is bad or there is no SD it gives the appropriate error message. When you reinsert a good SD things resume working correctly.

I wouldn't worry about this sort of feature for now. There are so many things that can cause this not to work correctly.

Amazing Layout :) :).

Wiz

Author:  Pito [ Mon Nov 26, 2012 3:31 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Nice..
Sdcard's:
1. with 244 we do not need 1meg pulldown on cs
2. pullups on sdrcard's /cs. di, do - I think they are still needed- when you go high with card's off signal, as first the 244's outputs go tristated, and then the voltage drops on vcc (caps). During this time I would keep pullpus there (ie 33k-100k). Pullups connected to their vcc.
2. If you breaks out with SPI then from the buffer's output (ie SPI2).

Author:  jaromir [ Mon Nov 26, 2012 4:43 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

wiz: where could I upload it? It is made in eagle 5.10, free edition should be enough, as size is 5x5cm.
Yes, I'm planning to make silk screen, as Itead offers this as standard. Labeling the connector pins is good idea, though I don't know how to make labels automatically. I can do it manually, but it will be slow, boring and error-prone work. Labels would be useful from both sides of PCB, presumably.

Pito: Yes, you are probably right. I'll try how many pull-up's I can on board, starting with pull-up on CS, then Di and finally DO.
I didn't understand the thing with breaking out from buffer. Did you mean that I should break out SPI from signals to some SD card and not original PSI from PIC?

Author:  majenko [ Mon Nov 26, 2012 4:46 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

You do know that iTead have sneakily increased their prices by now charging $8.98 extra for delivery ...?

http://digital-diy.com/forum/chit-chat/a-sneaky-price-increase-from-itead-and-trouble-at-seeed-t2533.html

Author:  wiz [ Mon Nov 26, 2012 5:19 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Jaromir,

IIRC I found it in some project subdirectory and downloaded it since it looked interesting. I have never used Eagle and figured it was just another free to try program on the web?

After you said you were using it, I tried to install it on my Knoppix box. With the usual ''are you celebate?' sorts of questions it installed! Maybe it works?

Please try to search web for eagle-lin-5.11.0.run. Hopefully you will 'just find it'. Also, please give me your e-mail address.

Wiz

Author:  wiz [ Mon Nov 26, 2012 5:21 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Jaromir,

Just noticed your question. Silk screens ARE a real drag. Maybe Eagle has some shortcuts, like an ASCII file that can be edited?

Otherwise, I'd just ship the PCB and worry about it for Rev. 2.

Wiz

Author:  wiz [ Mon Nov 26, 2012 5:50 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

Hi Jaromir,

I just looked at cadsoft.de/eagle/program and found the current Linux version as: eagle-lin-6.3.0.run.

I am now downloading it. Maybe it is free? and useful? I would be *very* careful about 'upgrading' at this point. Better to keep your current version of Eagle and your PCB in a known working condition than take a chance by upgrading right now !! :).

Download just finished. Who knows? Maybe it will work usefully?

HTH

Wiz

Author:  Pito [ Mon Nov 26, 2012 5:58 pm ]
Post subject:  Re: SDRAM based board - a prototype run - any interest on it

@jaromir: when you going to break out an SPI port to a connector, do it from the buffer instead directly from pic32, that is my suggestion..

Page 6 of 11 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/