-
Notifications
You must be signed in to change notification settings - Fork 1k
BLACK_F407ZET6 support #393
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
Comments
Hi @uzi18 If the pin mapping is nearly the same, the variant could be updated using board define as differentiator.
|
thx, will check this out |
@fpistm ok looks like difference is very small but for STM32F407V(E-G)Tx/PeripherialPins.c vs variant Black_V407VG some lines are commented out, do you know why? |
Yes, this is commented in the header:
To sum up, only one pin config is available. If you do not comment duplicated pins only the first occurence is used so second is never used and consume some space for nothing. |
@fpistm I have 2 of these boards on order so started to look at building a variant. Although PeripheralPins.c could easily be done with defines, the actual pin layout on the board is very different to the BLACK407VET6. The Variant.cpp file for BLACK407VET6 is laid out to represent the physical pin layout, accommodating the ZET6 here would necessitate either a) removing the physical layout altogether, or b) have a large ifdef section for each board. Do you think it best to do one of the above, or break the ZET6 out into it's own unique variant folder? |
docs are here: https://github.com/mcauser/BLACK_F407ZE |
@uzi18 thanks - I think I have the hardware covered, my question is more about what is best practice for variants in STM core. The ZGT board looks identical other than the MCU used (with double the flash), so it ought to be pretty easy to include a variant. |
There is no specific rules. If thanks a switch it's simple to support it then update the current variant. |
@fpistm do you think it is possible to work with integrated sdcard slot, is sdio supported? |
Yes SDIO is supported thanks STM32SD and FatFs library. Works on Black F407VE. |
wow did not find any reference to STM32SD library, if also SPI will work, I will try W5500 ethernet ;) |
I've tested this. SPI works just fine on the 407VET6, so no reason to think it won't on this. I think for the sake of simplicity I'll remove the 'physical layout of the 407VET6, that way one variant should suffice for VET6/ZET6/ZGT6. |
It could be nice solution. |
@uzi18 those are libraries avalable thanks arduino library manager. @BennehBoy we talk about SD via SDIO not SPI ;) |
Have used to git clone libs, not manager itself ;) |
Yes, I've had both working. SDIO using STM32SD, & SD via SPI using SdFat. |
@uzi18 I've created a PR to add support if you are able to test. |
can't find core_cm4.h |
What sketch are you using for the test? |
@BennehBoy @uzi18 I guess you have a misalignment in your install. |
@fpistm seen and commented. |
@fpistm You are right, it is impossible to build directly from git repo, so need to prepare fake core deploy dir, is there another way for test? |
See here -> https://github.com/stm32duino/wiki/wiki/Using-git-repository It explains how to use the git repo instead of the boards manager version (you must first have the boards manager version installed though). I copy my old 1.4.0 folder off first so I can swap it back in if I want to just test against 1.4.0 release... essentially when you clone this repo you will rename the folder to 1.4.0 Once you've done that, and have git tools installed, you can do the following:
Which means you can issue a command: git might complain though because you have to modify boards.txt and it will say those changes would be lost, in which case do 'git stash' then retry the above. Which will download this pr, create a branch called 393, and switch to it. You can also add this to remove any pr's when done:
|
have checked out pr 393 but didn't know that some other dirs are also needed I think git submodules shoud do the job here |
Better to just clone the entire repo and follow the instructions imho. |
My board is on the slow boat from China so it would be good to see some test results :) |
No gitsubmodule is not the right approach. The simpliest way is to clone the repo as described in the wiki then get the PR. |
@fpistm my idea is to have STM32 repo with core,cmsis tools etc. as submodules inside, so you can fetch everything related with one command line |
Oh ok up to you ;) |
building process works fine, now question, Serial object is mapped to Serial1 or SerialUSB? |
By default Serial is mapped on Serial1 for this PR. |
ok I see, it is not possible to choose any options for USB cdc, when you plan to merge #388 ? |
Simplest way would be to.... copy the relevant section from boards.txt in this pr
Make a copy of the black407VE variant folder git pr-clean git pr 388 copy the above saved black407VE folder over the top of the one that pr388 just updated add the saved boards.txt items in (see the code snippet above). This will manually merge my PR into #388 on your local working dir. |
Can wait for usb support, just asking. |
@fpistm @BennehBoy ok for now simple blink on LED_BUILTIN does not work for me. |
Hmm, I would try referencing the LED pins directly rather than LED_BUILTIN They should be on: PF_10 & PF_9 Could be that the arduino numeric pin mappings for the pins are not correct - I couldn't find a schematic with them marked (such as this for VET6 -> http://wiki.stm32duino.com/images/3/3e/Black_STM32f4VET6_Pinouts_Left.pdf) I actually used the Ver2 of those schematics which simply had the numeric numbering running consecutively as the pins progressed downwards - clearly incorrectly. I'll do some digging - if you have a similar schematic for ZE then please share. |
here you are: https://github.com/mcauser/BLACK_F407ZE/blob/master/docs/STM32F407ZET6_schematics.pdf for me pin numbering looks ok (except D1/D2/D3 - D3 - is directly 3v3 powered), will check this one more time |
@BennehBoy no change, now will check clock configuration etc... clocks looks ok |
D1 should start at PB12, ignore the top 4 pins which are power and ground. |
OK I've found an error in Variant.h I'll fix and commit. |
Done, if you grab the PR again and restest that would be great. |
@BennehBoy now is wrong with number of analogs ... |
It compiles fine for me.... where are you seeing that? |
From Variant.h
|
ok after make clean, all build, but D2/D1 still does not blink checked with PF9 and PF_9 and PF10 and PF_10 |
When you told D2/D1 you talk about LED not pin numbers? Correct syntax is PF9 or PF10. |
@fpistm yes, but it does not work either |
I've double checked and it all looks correct according to the schematic - maybe needs another set of eyes to spot if there's a glaring mistake. |
I've looked at the STM32GENERIC definition and it has the LED's on the same pins. The MicroPython config that you linked is contradictory, it has the LEDS on PA6 & PA7 in the pins.csv file, but PF9 & PF10 in the mpconfigboard.h My board arrival eta is ~ 2 weeks away :/ |
@BennehBoy stm32generic works for me with these leds, tested months before. |
Close this one as #402 merged |
I still need to test I2C and timers. |
@fpistm so can now test new USB CDC implementation? |
yes |
I'd be very surprised if i2c does not work, but please do test |
Hi @fpistm
I want to add this board as PR, do You think it is enough to copy BLACK_F407VE and modify a little?
I think big difference is number of IOs.
On the market it is possible also to buy BLACK_F407ZG module (1MB of flash).
The text was updated successfully, but these errors were encountered: