cpu: add stm32f2xx family support (based on #4497)#5397
cpu: add stm32f2xx family support (based on #4497)#5397kaspar030 merged 11 commits intoRIOT-OS:masterfrom
Conversation
* Update headers from ST * Add linker scripts
The driver was imported from stm32f0 Fixes: - Fix 12/24h handling (CR flag badly used) - Fix interrupt flag clearance and interrupt name
Add missing DMA interrupts for UART Improve baudrate intialization: - Return error if baudrate is theorically unreachable - Implement oversampling by 8 method for high baudrates Add UART hardware flow control support Ensure uart tx thread safety with a mutex Allow setting of pins mode per UART
Remove unneeded workaround from stm32f1 Make pullup configurable Fix OAR1 register initialization improve i2c read functions with repeatead start conditions avoid to any loop to become infinite improve i2c driver error handling add missing coma in array initializers
|
There is an updated version in de EWM... PR
|
|
@DipSwitch I had a look at the EWM PR, but it is a bit hard to see which parts are for the cpu and which are for the board. Also it seems to incorporate a lot of merges from other PRs. Can you indicate which parts are missing? We tested this PR extensively on the nucleo-f207 board (and on our own HW) so I think it is ready for a merge. |
|
What has to be done to have an implementation of the stm32f2 into RIOT ? |
|
Sorry, a significant portion of the RIOT community that usually looks into this kind of PRs is currently occupied with day job work. This should be finished by tonight. Optional tip: I'm no expert on porting but usually it helps to split up a PR like this into smaller ones, so people aren't overwhelmed by the sheer number of code lines (34700 is quiet a lot). |
|
@authmillenon thanks for the reply. I think the high number of added lines comes mainly from the register header files update. |
boards/nucleo-f207/include/board.h
Outdated
| #undef LED0_ON | ||
| #undef LED0_OFF | ||
| #undef LED0_TOGGLE | ||
| #define LED0_PIN GPIO_PIN(PORT_B, 0) |
There was a problem hiding this comment.
Could you please group LEDx_* together?
|
Hi guys, can we get an update on this? |
| enum { | ||
| AHB1, /**< AHB1 bus */ | ||
| AHB2, /**< AHB2 bus */ | ||
| AHB3 /**< AHB3 bus */ |
There was a problem hiding this comment.
I'd move a change here to a separate PR and use it in all other stm32s too then.
There was a problem hiding this comment.
You highlighted a good point. Actually, the number of AHB is not the same for all stm32 CPUs. This 'enum' should be part of the specific periph_cpu.h.
|
@haukepetersen Any idea when you will have time for reviewing this? We'd like to have it inside the next release. |
tests/periph_uart/main.c
Outdated
| #include "msg.h" | ||
| #include "ringbuffer.h" | ||
| #include "periph/uart.h" | ||
| #include "uart_stdio.h" |
There was a problem hiding this comment.
what's the reason for this?
There was a problem hiding this comment.
This makes sure UART_STDIO_DEV is defined, so the init command fails when trying to use the shell UART as a parameter.
Maybe there's a better way to do this?
Edit: removed reference to local commit sha which was squashed
|
@toonst @haukepetersen is in paternity leave until September. @emmanuelsearch Could you find out if anyone at FU has this board available? |
|
I get the following when compiling examples/default: |
If no maintainer has one available, I'd say, once everything compiles, let's merge anyways. Code-wise the PR looks very nice. |
this is copied from DipSwitch's pr
|
adressed in 378a7a5. Thanks for reviewing! |
|
I cleaned the history with rebase, should be ready for a merge now. |
|
The commits seem a bit messy... is it possible to squash them and order them by type? for instance all the uart commits in a single one, same for i2c, spi, etc... |
changes taken from DipSwitch's board: EMW3162 RIOT-OS#4498 PR. - Adds a functional implementation of the ADC - Implements low power mode
This board is based on a 144-pin stm32f207 cortex-m3
e7f67da to
146d462
Compare
|
@kYc0o addressed. Also rebased onto latest master. |
|
Thanks @toonst ! But sadly it will go into the next release... But as it's ready to merge it will go fast ;) |
|
Hi guys, is there any chance this PR could be merged soon ? |
|
Compiles fine, looks OK. How do we proceed? |
|
I think we should merge this, if @vincent-d promises to help with basic maintenance of the port. (merging code that maintainers cannot test is a more general discussion, I'll try to find consensus at devel@) |
|
@kaspar030 of course I can help with the maintenance of the port :) |
|
I could also help when I have more spare time. :)
|
Noone seems to disagree. ACK when Murdock is fine. |
|
Murdock complains about extra whitespaces in the vendor headers. Could you add those files to the doxygen excludes? |
|
Vendor headers excluded from doxygen |
|
Well, it's the static tests that complain. But we don't care, so go! |
Hi,
This pull request adds support for stm32f2xx family.
It's based on #4497, thanks @DipSwitch for the initial work.
The last commit adds the nucleo-f207 board based on stm32f207.