-
Notifications
You must be signed in to change notification settings - Fork 3k
TARGET_NRF5: A few corrections in HAL implementation. #2865
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
Conversation
retest uvisor |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 998 All builds and test passed! |
@sg- Please, do not merge it until I've tested it with BLE. |
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.
Could also add a correct implementation for the legacy HAL ?
https://github.com/ARMmbed/mbed-os/blob/master/hal/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/sleep.c
@@ -1986,7 +1986,7 @@ | |||
"supported_form_factors": ["ARDUINO"], | |||
"inherits": ["MCU_NRF51_32K_UNIFIED"], | |||
"progen": {"target": "nrf51-dk"}, | |||
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"], | |||
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"], |
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.
What is SERIAL_FC
?
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.
Serial Flow Control I believe
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, it's flow control.
|
||
// look if exceptions are enabled or not, if they are, it is possible to make an SVC call | ||
// and check if the soft device is running | ||
if ((__get_PRIMASK() == 0) && (sd_softdevice_is_enabled(&sd_enabled) == NRF_SUCCESS) && (sd_enabled == 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.
maybe it would be better to use softdevice_handler_isEnabled
which a simple function call and not an SVC call.
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.
Good point. I took the code from mbedOS 3 and only corrected it, so it would run on nRF52. But indeed, it should be refactored a bit more.
@mbed-bot: TEST HOST_OSES=ALL |
[Build 1006] |
Flow control sett interface implementation (https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_NORDIC/TARGET_NRF5/serial_api.c#L527) needs additional work in order to be comply with API description. |
# Conflicts: # hal/targets.json
… used the new implementation in legacy HAL for NRF51822.
This reverts commit 1f208f6. # Conflicts: # hal/targets.json
I reverted the changes done to targets.json (enabling the flow control interface), since our current implementation of 'serial_set_flow_control()' is not fully consistent with API description (as @nvlsianpu spotted). It needs rework before it can be enabled. |
…better fit mbed coding style.
…oved the new one to FEATURE_BLE, so it is picked only when SoftDevice is in use.
@pan- Tested and approved? |
@0xc0170 reviewed, yes; tested, not yet! |
related to #2894 as well |
@0xc0170 Thoroughly tested, LGTM. |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 0 All builds and test passed! |
Removed the "backport 5.2.0-rc3" tag since this was causing problems for the release script. Created a PR #3032 to bring in the changes. |
@c1728p9 What kind of problem ? |
@pan- since this pr was merged with master multiple times rather than being rebased, the script used to generate the release tried to pull in the same commits multiple times causing it to fail. |
Corrections made to address the following issues:
Mbed 2 - Mbed OS 5 : Sleep incorrect for Nordic target
TARGET_NRF5(NRF52_DK):Can't use A5(P0_31) as DigitalOut mode.
And enabled changing of flow control settings in runtime.