Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would this work with my STM32F103C8T6-based custom board? #4

Closed
roybaer opened this issue Nov 4, 2019 · 9 comments
Closed

Would this work with my STM32F103C8T6-based custom board? #4

roybaer opened this issue Nov 4, 2019 · 9 comments

Comments

@roybaer
Copy link

roybaer commented Nov 4, 2019

Hi!

I would like to ask whether there is any chance that your firmware might work with my custom board design from early 2018.

It uses the same STM32F103C8T6 and plugs into the back of the drive. Unfortunately, I never found the time to write proper firmware for it.

The pinout is:

µC pin Signal Drive pin
PA0 INDEX 8
PA3 WGATE 24
PA4 DRVSA 14
PA5 DRVSB 12
PA6 MOTEB 16
PA7 MOTEA 10
PA8 DSKCHG 34
PA9 REDWC 2
PB0 DIR 18
PB1 STEP 20
PB10 TRK00 26
PB11 WPT 28
PB12 DTID1 4
PB13 SIDE1 32
PB14 RDATA 30
PB15 WDATA 22
@keirf
Copy link
Owner

keirf commented Nov 4, 2019

No reason why not really. Most of the pin-specific stuff is at the top of src/floppy.c. Gotchas I can see:

  • Not all your pins are on GPIOA so you will need to be more flexible than my single 'gpio_floppy' defn.
  • INDEX gets configured for an EXTI IRQ. Yours is on PA0 so you need to adjust the EXTI init appropriately, and your IRQ number will be different.
  • The timers and DMA channels for RDATA/WDATA will be different. That's mostly abstracted at the top of src/floppy.c but the code currently assume two separate timers, whereas you are on two channels of the same timer. It shouldn't much matter, but you'll have to juggle the init/deinit code to do a fuller initialisation when switching between read and write mode.

@roybaer
Copy link
Author

roybaer commented Nov 4, 2019

Nice! That should be doable. I'll have a look in the near future.

The use of two different GPIO ports was mostly for routing reasons. The board is only 19mm × 48mm, after all.

@Volutar
Copy link

Volutar commented Nov 5, 2019

Sorry for making comment in this (closed) issue, but I think this question doesn't deserve its own, and practically related to this.

So question is:
Is it possible to rewire blue pill differently (according microcontroller pin reassignment), to minimize "dupont wiring", so it will be possible to adjust STM32 firmware?
To something like this:
image

Currently it looks randomish... And making GW "that" will definately ease wiring alot, and make whole hw setup less messy.

@drdpj
Copy link
Contributor

drdpj commented Nov 5, 2019 via email

@Volutar
Copy link

Volutar commented Nov 5, 2019

You need to see which pins are 5V tolerant... Not all of them are!

There is only one pin on this side of blue pill, which is not 5v tolerant - B5, and it's "not connected". We can unsolder this pin in the worst case (and probably this could be needed for 5.25", since they use pin 6 for Drive D).

@keirf
Copy link
Owner

keirf commented Nov 6, 2019

A11 and A12 are USB. A9 and A10 are for serial (ie at least I use them!). It is not tenable long term to expect users to connect dirdct to the pill. Adapter boards will happen. They will be very cheap.

@Volutar
Copy link

Volutar commented Nov 6, 2019

Well, it’s a bummer. While A9/A10 can get some workaround, A11/A12 are not usable :(
People with dozen of disks to capture hardly gonna order adapter boards. I’m sure >90% of users are not longterm (and even if longterm, tend to be more sporadical), and will use temporary mishmashed dupont cable setup (and already using it). So at least some wire rearrangement ( in order to lessen crossing) would be appreciated.
Thanks for the answer!

@keirf
Copy link
Owner

keirf commented Nov 6, 2019

Those people will just have to put up with a slight Dupont mishmash to save a couple of quid. It's not actually that bad anyway.

@dwillmore
Copy link

Could A8/A9 be used for the other drive select and motor signals?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants