-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix nrf52 enabled uart count and enable uart0/1 #10753
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
Fix nrf52 enabled uart count and enable uart0/1 #10753
Conversation
@desmond-blue, thank you for your changes. |
|
||
/** | ||
* Array with UARTE register pointers for easy access. | ||
*/ | ||
static NRF_UARTE_Type *nordic_nrf5_uart_register[NRFX_UART_ENABLED_COUNT] = { | ||
static NRF_UARTE_Type *nordic_nrf5_uart_register[NRFX_UARTE_ENABLED_COUNT] = { | ||
NRF_UARTE0, | ||
#if UART1_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.
I guess this should be defined?
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 reviewing this, you are correct.
UART1_ENABLED
shall be defiend as 1, somehow the updating Nordic SDK to 15 disabled it.
7e4b8cf
to
d9db087
Compare
I tested this pull request and now the board doesn't crash anymore but it looks like UART is still not working. More details in Jira ticket. |
needs: work set , waiting for the update |
d9db087
to
5cd7f60
Compare
@0xc0170 this fix is needed in Mbed OS 5.13. |
Hi @0xc0170 , I've updated the change, it is tested by the reporter, would you please merge this PR, thanks! |
CI started |
Test run: FAILEDSummary: 1 of 7 test jobs failed Failed test jobs:
|
See IAR logs, related failure: |
@desmond-blue could you please take a look at the failures, they seem to be valid. |
5cd7f60
to
d5624b6
Compare
sdk_config.h is updated for TARGET_MCU_NRF52832, which is used on NRF52_DK. |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
This is a proposed fix for internally raised issue IOTDEV-2195.
The reason it hangs is we don't allocate nordic_nrf5_uart_state for UART1, so the initialing procedure for UART1 access an invalid memory space and retrieve wrong information.
Version of Nordic SDK has been changed from 14.2 to 15.0,
NRFX_UART_ENABLED_COUNT
doesn't represent the supported UART correctly, instead we need to useNRFX_UARTE_ENABLED_COUNT
to represent count of enabled UART.sdk_config.h is also updated to enable UART0/UART1 as default.
Pull request type
Reviewers
Release Notes