-
Notifications
You must be signed in to change notification settings - Fork 3k
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
STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH #3121
Conversation
Thanks for the fix on UART/USART this looks good to me. |
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.
Thanks for the fix on UART/USART this looks good to me.
the PR also fixes a warning issue - this would better be delivered in a separate commit if that's ok
@@ -875,6 +876,7 @@ void serial_rx_abort_asynch(serial_t *obj) | |||
// clear flags | |||
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF | UART_CLEAR_FEF | UART_CLEAR_OREF); | |||
volatile uint32_t tmpval = huart->Instance->RDR; // Clear RXNE flag | |||
UNUSED(tmpval); |
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.
same here
/morph test |
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.
Code LGTM
Thanks for the review, LMESTM. I've split the single commit into two separate commits, one for the USART -> UART change, and a second for the two unused variable warnings. I hope this is what you intended. |
Result: FAILUREYour command has finished executing! Here's what you wrote!
|
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 942 All builds and test passed! |
@monkiineko can you please sign https://developer.mbed.org/contributor_agreement/ ? Once you do, please notify us. This PR is ready for integration |
@0xc0170 thanks. I've signed the linked agreement. My developer.mbed.org account name is "bscott". I have the same e-mail address registered both here and there. |
Ports for Upcoming Targets Fixes and Changes 2966: Add kw24 support ARMmbed/mbed-os#2966 3068: MultiTech mDot - clean up PeripheralPins.c and add new pin names ARMmbed/mbed-os#3068 3089: Kinetis HAL: Remove clock initialization code from serial and ticker ARMmbed/mbed-os#3089 2943: [NRF5] NVIC_SetVector functionality ARMmbed/mbed-os#2943 2938: InterruptIn changes in NCS36510 HAL. ARMmbed/mbed-os#2938 3108: Fix sleep function for NRF52. ARMmbed/mbed-os#3108 3076: STM32F1: Correct timer master value reading ARMmbed/mbed-os#3076 3085: Add LOWPOWERTIMER capability for NUCLEO_F303ZE ARMmbed/mbed-os#3085 3046: [BEETLE] Update BLE stack on Beetle board ARMmbed/mbed-os#3046 3122: [Silicon Labs] Update of Silicon Labs HAL ARMmbed/mbed-os#3122 3022: OnSemi RAM usage fix ARMmbed/mbed-os#3022 3121: STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH ARMmbed/mbed-os#3121 3142: Targets- NUMAKER_PFM_NUC47216 remove mbed 2 ARMmbed/mbed-os#3142
Description
When DEVICE_SERIAL_ASYNCH is defined during compile of an STM32F3 target, SerialBase::write() for UART4 and UART5 can't be used because UART4 and UART5 were referenced in serial_api.c as USART4 and USART5 but the real defines were created using UART4 and UART5 names.
Status
READY
Migrations
NO
Related PRs
None
Todos
None
Deploy notes
None
Steps to test or reproduce
Create a build for an STM32F3 based target device and define DEVICE_SERIAL_ASYNCH.
Create a Serial object using pins associated with UART4 or UART5.
Attempt to use the write() member function to transmit data using an IRQ.
Nothing gets transmitted and transmit complete event is never generated because the IRQ to use was not determined due to the bug.