-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32 UART init update #5570
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
STM32 UART init update #5570
Conversation
- serial_init, serial_free and serial_baud function moved from serial_device.c (specific to each STM32 family) to serial_api.c (common STM32 file) - default baudrate value was hardcoded to 9600 - Value is set now to MBED_CONF_PLATFORM_STDIO_BAUD_RATE for STDIO - Value is set now to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE for other use - UART init will not be stopped before calling serial_baud function
#if defined (TARGET_STM32F091RC) | ||
#define UART_NUM (8) | ||
#if defined (TARGET_STM32F031K6) | ||
#define UART_NUM (1 |
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.
a parenthesis is missing ?
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, I didn't see this build failure in the non reg tests... :-(
#define UART_NUM (6) | ||
#elif defined (TARGET_STM32F429xI) || defined (TARGET_STM32F439xI) || defined (TARGET_STM32F437xG) || defined (TARGET_STM32F469xI) | ||
#define UART_NUM (8) | ||
#elif defined (TARGET_STM32F413xH) |
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 merge this #elif and the #else below ?
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.
done
targets/TARGET_STM/serial_api_hal.h
Outdated
|
||
// #include "cmsis.h" |
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.
remove this dead code ?
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.
done
@jeromecoutant Please look at travis failure, related to the changesets |
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.
Updates done (Travis will also be OK)
Thx for the code review
#if defined (TARGET_STM32F091RC) | ||
#define UART_NUM (8) | ||
#if defined (TARGET_STM32F031K6) | ||
#define UART_NUM (1 |
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, I didn't see this build failure in the non reg tests... :-(
#define UART_NUM (6) | ||
#elif defined (TARGET_STM32F429xI) || defined (TARGET_STM32F439xI) || defined (TARGET_STM32F437xG) || defined (TARGET_STM32F469xI) | ||
#define UART_NUM (8) | ||
#elif defined (TARGET_STM32F413xH) |
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.
done
targets/TARGET_STM/serial_api_hal.h
Outdated
|
||
// #include "cmsis.h" |
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.
done
/morph test |
/morph build |
Build : SUCCESSBuild number : 655 Triggering tests/morph test |
Test : FAILUREBuild number : 479 |
Exporter Build : SUCCESSBuild number : 298 |
We have seen related test failures intermittently, retesting to confirm. |
Test : FAILUREBuild number : 484 |
@jeromecoutant Getting a failure that we have seen earlier :/ Do you have the target to reproduce this failure? /morph test |
Failure is not related to the PR... it is a known issue: #5622 |
Test : FAILUREBuild number : 488 |
Could this PR be merged ? |
/morph build |
/morph build |
Build : SUCCESSBuild number : 699 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 341 |
Test : FAILUREBuild number : 529 |
The failure is known, being investigated, hopefully resolved soon |
So it can be merged ? :-) |
Green policy here 🍏 📗 needs to get green |
/morph test |
Test : FAILUREBuild number : 580 |
/morph test |
Test : FAILUREBuild number : 603 |
Needs to be rebuild I believe /morph build |
Build : SUCCESSBuild number : 783 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 437 |
Test : SUCCESSBuild number : 618 |
🍏 Green ! |
Description
serial_init, serial_free and serial_baud functions moved from serial_device.c (specific to each STM32 family) to serial_api.c (common STM32 file)
default baudrate value was hardcoded to 9600
UART init will not be stopped before calling serial_baud function
for LPUART, init procedure can update the clock source depending on expected baudrate
This should close #5389 issue
Status
READY
Tests
OS2 and OS5 tests verified for all STM32 targets