[feature req.] Protection against reversed FDD connector

Post Reply
tzok
Posts: 79
Joined: Sat Jan 27, 2018 2:52 pm

[feature req.] Protection against reversed FDD connector

Post by tzok »

Jeff wrote:
Tue Jun 05, 2018 12:11 pm
:arrow: This doesn't work : The floppy image appears to be loaded by the emulator, but the machine can't read the disk.
The Gotek green LED is permanently lit (no flashing)


The floppy ribbon is probably connected to the wrong way. Try to reconnect it to the other way.

Explanation : A wrongly connected floppy ribbon force the drive selection by short-circuiting the floppy signals to the ground, and make the selection LED always lit. Of course the machine can't communicate with the emulator in such situation.
Be aware that with some machines the floppy ribbon coloured wire is NOT the pin 1 !
I believe it would be worth adding a simple check for such condition in the bootloader and firmware to avoid damaging the GPIO pins of the ARM in the GOTEK, by shorting output pins to GND and/or Vcc (in some computers). The initial GPIO pins state is input/HiZ, so no harm will be done by reverse connection, and adding a quick check if pins that are about to be outputs are not shorted to GND/Vcc before configuring them as outputs could be a good idea.

Jeff
Site Admin
Posts: 8093
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: [feature req.] Protection against reversed FDD connector

Post by Jeff »

tzok wrote:
Sat Jul 14, 2018 1:36 pm
Jeff wrote:
Tue Jun 05, 2018 12:11 pm
:arrow: This doesn't work : The floppy image appears to be loaded by the emulator, but the machine can't read the disk.
The Gotek green LED is permanently lit (no flashing)


The floppy ribbon is probably connected to the wrong way. Try to reconnect it to the other way.

Explanation : A wrongly connected floppy ribbon force the drive selection by short-circuiting the floppy signals to the ground, and make the selection LED always lit. Of course the machine can't communicate with the emulator in such situation.
Be aware that with some machines the floppy ribbon coloured wire is NOT the pin 1 !
I believe it would be worth adding a simple check for such condition in the bootloader and firmware to avoid damaging the GPIO pins of the ARM in the GOTEK, by shorting output pins to GND and/or Vcc (in some computers). The initial GPIO pins state is input/HiZ, so no harm will be done by reverse connection, and adding a quick check if pins that are about to be outputs are not shorted to GND/Vcc before configuring them as outputs could be a good idea.
Have a look to the schematic : output gpios are not directly connected to the floppy bus.

tzok
Posts: 79
Joined: Sat Jan 27, 2018 2:52 pm

Re: [feature req.] Protection against reversed FDD connector

Post by tzok »

Some are, some are not. DIR, STEP, WDATA and WGATE are directly connected. Yet they are supposed to be open-collector type outputs so shorting them to ground should not do any harm to them. Anyways this quick check shouldn't be too complicated, and could make life easier.

See this topic for example: http://torlus.com/floppy/forum/viewtopi ... =33&t=3287

Jeff
Site Admin
Posts: 8093
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: [feature req.] Protection against reversed FDD connector

Post by Jeff »

tzok wrote:
Sat Jul 14, 2018 6:18 pm
Some are, some are not. DIR, STEP, WDATA and WGATE are directly connected. Yet they are supposed to be open-collector type outputs so shorting them to ground should not do any harm to them. Anyways this quick check shouldn't be too complicated, and could make life easier.

See this topic for example: http://torlus.com/floppy/forum/viewtopi ... =33&t=3287
DIR, STEP, WDATA and WGATE are input signals.

Post Reply