-
Notifications
You must be signed in to change notification settings - Fork 1k
New variant BLACK_F407VE #269
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
Conversation
@edogaldo I applied this over the boards manager delivered version of the core (1.3.0) And get the following when I try compile any of my sketches: `C:\Users\xxxx\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.3.0\cores\arduino\stm32\low_power.c: In function 'LowPower_EnableWakeUpPin': C:\Users\xxxx\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.3.0\cores\arduino\stm32\low_power.c:98:12: error: 'SYS_WKUP1' undeclared (first use in this function)
I also tried compiling one of the core SPI examples and get the same error - but only when this board selected. Perhaps my installation issue - I cloned your repo, switched branch to BLACK407 one, and then copied the board.txt and variant folder into the STM core folder |
@BennehBoy , in fact there is 2 solutions: If you want use Low power then it misses only Else disable |
I put the PinNamesVar.h in the variants folder and it compiles now. I had not explicitly intended to use lowpower - presumably some of the library code or funtioncality that my project references requires it. As above, I also tested BarometricPressureSensor.ino before making your suggested change and also had the same failure mode - does SPI rely on lowpower? I've not got time to go digging in the dependencies I'm afraid. |
@fpistm: there is no reference to PinNamesVar.h in the wiki page. |
Just another note, I set the SPI pins back to the defaults (I'm porting a project over from the GENERIC core), I think it may make more sense to use those in variants.h:
But otherwise, great work! Just need USB Serial & a bootloader now ;) |
I set the SPI pins used by the NRF24 adapter.. |
1.3.0 releases the rtc and low power drivers. That's why if you enable the About default SPI. Don't know what is the best definition as I do not have this board. |
I went by this -> http://wiki.stm32duino.com/images/3/3e/Black_STM32f4VET6_Pinouts_Left.pdf But point taken at sketch level redefine - I just thought most people might expect it on the 'defaults'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First review.
Nice variant, good job ;).
See my comments.
Also update the commit message to be more explicit, for example:
Add Black F407VE support
#define HAL_PWR_MODULE_ENABLED | ||
#define HAL_RCC_MODULE_ENABLED | ||
/* #define HAL_RNG_MODULE_ENABLED */ | ||
/* #define HAL_RTC_MODULE_ENABLED */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use RTC you could uncomment this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you suggest to enable it? I'm fine with your suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes moreover it is required for LowPower
#define HAL_SPI_MODULE_ENABLED | ||
#define HAL_TIM_MODULE_ENABLED | ||
#define HAL_UART_MODULE_ENABLED | ||
#define HAL_USART_MODULE_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HAL USART is not used. You could comment it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
/* #define HAL_MMC_MODULE_ENABLED */ | ||
#define HAL_SPI_MODULE_ENABLED | ||
#define HAL_TIM_MODULE_ENABLED | ||
#define HAL_UART_MODULE_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UART is now enabled thanks menu, so best way is to not enable it to be able to save space is no uart required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the UART define should be commented, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there's something to change also in boards.txt?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already up to date in board.txt
https://github.com/stm32duino/Arduino_Core_STM32/pull/269/files#diff-fce09ad94aad2ba67472cd9142f00146R570
{PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 | ||
{PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 | ||
{PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only ADC1 will be available ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well.. I followed the approach seen in other variants but of course open to improvement suggestions..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact you could enable as many ADC you want and use also other ADC instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are ok, I'd stick with only ADC1 as default, leaving extentions to future improvements.
Else, please suggest a better configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've no objection :)
I don't know well this board.
This could be update later if several user require them.
variants/BLACK_F407VE/variant.cpp
Outdated
PC_2, | ||
PC_3, | ||
PC_4, | ||
PC_5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one extra ","
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?!?
edit: ok, got it!
variants/BLACK_F407VE/variant.h
Outdated
extern const PinName digitalPin[]; | ||
|
||
// Enum defining pin names to match digital pin number --> Dx | ||
// !!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those comments could be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
variants/BLACK_F407VE/variant.h
Outdated
// First analog pin value (A0) must be greater than or equal to NUM_ANALOG_INPUTS | ||
#define NUM_ANALOG_FIRST 75 | ||
|
||
// Below ADC, DAC and PWM definitions already done in the core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's "ditto"?!? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto noun [ C, usually singular ]
the symbol (〃) that means 'the same' and is written immediately under a word or phrase that you are repeating so you do not have to write it out again
so, same comment as before ;)
Those comments could be removed.
//#define ADC_RESOLUTION 12 | ||
//#define DACC_RESOLUTION 12 | ||
|
||
// PWM resolution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep commented defines for future use..
variants/BLACK_F407VE/variant.h
Outdated
#define PIN_SPI_MISO PB4 // NRF24 connector | ||
#define PIN_SPI_SCK PB3 // NRF24 connector | ||
|
||
// I2C Definitions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto :)
variants/BLACK_F407VE/variant.h
Outdated
// DEBUG_UART Tx pin name, default: the first one found in PinMap_UART_TX for DEBUG_UART | ||
//#define DEBUG_PINNAME_TX PX_n // PinName used for TX | ||
|
||
// UART Emulation (uncomment if needed, required TIM1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto :)
One question about board menu, maybe it could be a good idea to add this under "Generic STM32F407 series" ? |
Thanks @fpistm! I'll deeply check your comments later.
Respect to your last question: in my opinion it could make sense to create
groups "generic F1", "generic F4", etc.. so that you don't end up with too
many "generic" groups.
Il 25 Giu 2018 21:50, "Frederic Pillon" <[email protected]> ha
scritto:
… One question about board menu, maybe it could be a good idea to add this
under "Generic STM32F407 series" ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATTZbkcxkcgUS4r5b1lMTCwISLpMzxtXks5uAT8RgaJpZM4U0ICv>
.
|
@BennehBoy: as a board user I'd expect that the default board configuration leverages the board features. |
@fpistm: as a general rule, do you need me to apply the proposed changes in my PR? |
Yes, it should be fine. Thanks |
@edogaldo - my bad I thought the board you were using was the Black F407VET V2.0 - way too many boards coming out of China! @fpistm I may be straying into unwanted territory on this PR, but I've tried to get SD working - I've copied sdconf.h & ffconf.h from the DISCO_F746NG variant, and redefined the SD_DETECT_PIN to PA4 where SS is mapped on this board. Compile time however I get a whole raft of errors from FatFs & STM32SD.... is it OK to post those here for some assistance, or should I open an issue on STM32SD? |
Commit stm32duino#2 based on @fpistm suggestions
@BennehBoy: the board is this one, which one are you referring to?! |
@BennehBoy please, open a new issue to not mix Variant addition and SD support. |
@edogaldo same board, I just don't have the nrf24 module - lucky you :) |
@edogaldo you misunderstand me, my board has the header, but I do not have an NRF24L01 module to insert into the header. |
@edogaldo You're right, it should be fine to add a genericF4 menu and then add black F407 in this one. |
@edogaldo you can do |
Hi Fredric, do you need me to commit your patch in the PR?
Thanks in advance and best, E. |
The archive contains several patch file.
|
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Hi @edogaldo, |
What about variant BLACK_F407ZE? |
Dear @fpistm, first of all please apologize for late reply.
I'd suggest to include it as is so that other people can benefit of it and also perform further tests (and maybe provide fixes and improvements). Thanks in advance and best regards, E. @uzi18: feel free to go with your new variant, instructions on how to implement it are in the wiki and you can of course benefit of this variant as an example. |
No worries @edogaldo |
I come a little bit late to the party, but one suggestion: |
- Define PIN_SPI_SS1 as W25Q16 (on board flash) CS pin - Add comment to describe which is the default SPI configuration in boards.txt
Is there some work needed on this PR? I have the board and can volunteer. |
Hi @ghent360: at the moment there's the need to perform some tests and check if everything is ok; if you could do it, it would be helpful. Thanks and best, E. |
What tests do you need done?
…On Wed, Aug 29, 2018 at 12:36 AM edogaldo ***@***.***> wrote:
Hi @ghent360 <https://github.com/ghent360>: at the moment there's the
need to perform some tests and check if everything is ok; if you could do
it, it would be helpful.
Thanks and best, E.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHxY1uX-73HPBlGlem1AFqPy12mbbvTuks5uVkSNgaJpZM4U0ICv>
.
|
@ghent360 : I don't know if this issue is only board related: If you own an ILI9341 maybe you can observe this: regards |
Well @madias123, this seems not specifically related to this variant in any case, is it? |
@edogaldo This is the big question if this symptoms occurs only to this variant. Sadly this is my only *F4 board I own, so I cannot test it with another variant and my logic analyzer is only capturable to about 12MS/s so I cannot do full speed SPI testing (or measuring) |
Strange error: Error compiling for board Generic STM32F4 series. Maybe I'm doing something wrong: In the .arduino15/packages/STM32/hardware/stm32 folder I renamed the 1.3.0 folder to ___. I'm trying to compile the "blink" example, but I'm getting the above error. |
Which OS?
If Win I'm not sure you can use a symlink.
Did you activate verbose logging?
Il Gio 30 Ago 2018, 08:55 ghent360 <[email protected]> ha scritto:
… Strange error:
Board GenF4 (platform stm32, package STM32) is unknown
Error compiling for board Generic STM32F4 series.
Maybe I'm doing something wrong:
In the .arduino15/packages/STM32/hardware/stm32 folder I renamed the 1.3.0
folder to ___.
I created a sym link to the folder where git cloned the pull request. I
can now see the "Generic STM32 F4" board menu and the "BLACK 407VE" board
part number.
I'm trying to compile the "blink" example, but I'm getting the above error.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATTZbn2VF2GgHaLt5E-g9ujVdKX9N5vXks5uV4x3gaJpZM4U0ICv>
.
|
Ubuntu 18.04. Yes I have verbose logging. |
If I only copy the boards.txt file and the variants/BLACK_F407VE folder it seems to work fine. |
I have ILI9341 display - 2.4 inch. This is the test I compiled: I hooked the SPI_MISO (PB4) to pin 7 of the NRF24L01 connector. Display power to 5V, display LED to 3.3V. Here is a video of the sketch working (https://youtu.be/Fgqo3emIVrw). |
FYI, I've get a Black F407 so I will be able to validate and also try to Fix SD part. |
Hi guys,
Edit: |
|
||
// I2C Definitions | ||
//#define PIN_WIRE_SDA 14 // Default for Arduino connector compatibility | ||
//#define PIN_WIRE_SCL 15 // Default for Arduino connector compatibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define PIN_WIRE_SDA PB9
#define PIN_WIRE_SCL PB8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @fpistm: thank you for your update, do you still need me to post a commit for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @edogaldo,
I will push my branch as it is rebased on top of the master.
I've resolved all merge conflicts.
I've raised here to track this issue.
This PR is replace by #327 |
Hello I would like to push a new variant for this board.
I could successfull test Serial and SPI (on a NRF24L01P).
Best, E.