cancel
Showing results for 
Search instead for 
Did you mean: 

An ''old-fashioned'' question about SCSI Bus...

Zaher
Senior II
Posted on October 14, 2015 at 06:44

Hello There,

Yesterday while I was reading through the STM32 USB-FS-Device development kit for the first time (UM0424), I was really surprised that the SCSI Protocol Implementation is part of this software library. This is of great interest to me because I'm working on a SCSI Disk project for a vintage system and at the moment, I had to choose an off-the-shelf SCSI to IDE bridge as the backbone to this project. As many of you already know, SCSI is an ancient, yet very complex subject and most technical notes available on the web are scarce and obscure. However, as I came across this in UM0424, and after reading through the associated code, I thought that I could replace that expensive and obsolete SCSI to IDE bridge with an STM32F1 MCU. 

The library has a full implementation for a SCSI Command Block interpreter, as well as, memory management and access for LUNs, or logical units on different form of storage media (USB, SD, ATA, etc..). 

I have read a handful of pages and tutorials about SCSI and I have now a good foundation that I can build upon. However, and in order to get where I want faster with less troubles, it would be great if someone here has a practical experience with SCSI. I'm mainly concerned about the LUN Access and Implementation, interfacing with the SCSI Bus (DMA, FMC, or GPIO), buffering, and data transfer to/from the LUN. 

Any bit of information is highly appreciated...

Thank you,

Zaher

#scsi
3 REPLIES 3
Posted on October 14, 2015 at 09:27

Well scarily enough I go back to SASI, the precursor to SCSI.

I think you're problem with DMA/FMC would be you really can't account for the Phase of the bus, should it terminate/change mid transfer. You're not going to have the REQ/ACK type signalling you need.

Can you interface an NCR5380 to the system? I suspect you'd need one, or 74 series buffering so as not to clash. The STM32 doesn't have an external DRQ/DACK type external DMA mechanism. I think you're easiest route might be to bit-bang the interface using GPIO's.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Zaher
Senior II
Posted on October 14, 2015 at 21:45

Mr. Clive,

Thank you for the input. I'm sure you've been exposed to SASI and SCSI even before I was born. :)) Sorry to brush up on those forgotten memories. 

Well, the SCSI interface of the system was designed around MB86604L, a SCSI Protocol Controller from Fujitsu, very popular back then. SCSI Bus used to connect to external storage devices, Zip Drive, HDD, etc.. So, what I'm after is just the SCSI disk type model. So, you suggest a 74 series buffering for all the 18 signals? By the way, how much current does a GPIO pin draw/sink in a STM32? And by the way, the SCSI Bus is terminated (passive terminator) on the target side. Do you think I need to add more termination at the STM32 side of the bus? Basically, the SPC and STM32 (target and its LUN) should be only 3~4 inches apart on the same PCB. This is how I intend to do it if everything went as expected with the SCSI Bus...

Thank you again for your valuable advice! 

Zaher

Zaher
Senior II
Posted on September 22, 2016 at 22:07

Dear Mr. Clive,

I hope you don't mind getting back to this, but I've been trying to do it utilizing an off-the-shelf SCSI bridge and now I decided to drop that and replace it with an STM32-based implementation so I can get more control over my application, especially by adding USB connectivity to my end application. I just need you to elaborate some points for me regarding the DMA of the STM32, as well as, the FS-USB and the media access layer.

I look forward to hearing from you!

Thank you in advance!

Zaher