Skip to content
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

Merged
merged 2 commits into from
Oct 27, 2016

Conversation

bscott-zebra
Copy link
Contributor

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.

@LMESTM
Copy link
Contributor

LMESTM commented Oct 25, 2016

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

Copy link
Contributor

@LMESTM LMESTM left a 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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 25, 2016

/morph test

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@bscott-zebra
Copy link
Contributor Author

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.

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

@bridadan
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 942

All builds and test passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 26, 2016

@monkiineko can you please sign https://developer.mbed.org/contributor_agreement/ ?

Once you do, please notify us. This PR is ready for integration

@bscott-zebra
Copy link
Contributor Author

@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.

@0xc0170 0xc0170 merged commit da377aa into ARMmbed:master Oct 27, 2016
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants