-
Notifications
You must be signed in to change notification settings - Fork 3k
Add support for VBLUno51 board #4629
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
+ VBLUno51 board: Nordic nRF51822 Bluetooth Low Energy DAPLink interface Arduino UNO pinout compatible 4 Power + Uncyclo: https://vngiotlab.github.io/vbluno/ + Pass all test case in mbed test suite Signed-off-by: iotvietmember <[email protected]>
#define CTS_PIN_NUMBER UART0_CONFIG_PSEL_CTS | ||
#define RTS_PIN_NUMBER UART0_CONFIG_PSEL_RTS | ||
|
||
/* Use config at PinNames.h file in TARGET_XXXX directory */ |
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 this fixing? should this be separate commit?
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.
Hi @0xc0170 : My board do not use default config for RTS, CTS pin.
Nordic nRF51822 based boards:
nrf_drv_config.h
#define UART0_CONFIG_PSEL_CTS 10
#define UART0_CONFIG_PSEL_RTS 8TARGET_NRF51_DK/PinNames.h
CTS_PIN_NUMBER = p10,
RTS_PIN_NUMBER = p8
VBLUno51 board
TARGET_VBLUNO51/PinNames.h
CTS_PIN_NUMBER = p13,
RTS_PIN_NUMBER = p12
I think that should use config for CTS, RTS pin from PinNames.h file.
This change allows each board to use different hardware configurations
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 explanation.
cc @nvlsianpu
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.
We have the same problem with those hardcoded pins in sdk_config.h see #4488
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.
@andreaslarssonublox : Thanks for your information
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.
Would this fix it @andreaslarssonublox ? Thanks for referencing the issue !
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.
@0xc0170 Yes, removing the CTS_PIN_NUMBER/RTS_PIN_NUMBER defines from sdk_config.h would fix it for us.
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.
Generally I approve this fix. Remove those definition from here instead of comment it.
"supported_form_factors": ["ARDUINO"], | ||
"inherits": ["MCU_NRF51_32K_UNIFIED"], | ||
"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"], | ||
"release_versions": ["2"], |
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.
Is this target only for mbed 2 , not mbed 5 (it inherits from the target that is supporting 5 as well ) ?
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.
Hi @0xc0170 : I have thought that to support mbed-os 5
, I need to pay the fee for mbed team. If it is free, I will add mbed-os 5
version for the VBLUno51 board
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.
@0xc0170 , Would you please tell me that I can add mbed-os5
version for the VBLUno51 board (Nordic nRF51822xxAC based)?
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 was just asking what is the reason, please leave it as it is for now.
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.
@ 0xc0170, How to select a dedicated detect_code
to VBLUno51 board? Thanks
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.
Please write to the mbed support, they will provide you details. There was a similar question asked on developer page, here for reference https://developer.mbed.org/questions/73405/how-is-detect_code-field-in-target-defin/
Hi @0xc0170 , @theotherjimmy : I hope that this PR would be merged soon. Many thanks for your help. |
@iotvietmember What with my comment on UART hardcoded pins definition remove? |
Hi @nvlsianpu, our board uses Nordic nRF51822 but do not uses default config for UART communication. I think that should uses config in PinNames.h file |
@iotvietmember I mean that you should remove lines: https://github.com/iotvietmember/mbed-os/blob/add_target_vbluno51/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk_patch/sdk_config.h#L10-L12 instead of comment it. |
Signed-off-by: iotvietmember <[email protected]>
#define CTS_PIN_NUMBER UART0_CONFIG_PSEL_CTS | ||
#define RTS_PIN_NUMBER UART0_CONFIG_PSEL_RTS | ||
|
||
/* Use config at PinNames.h file in TARGET_XXXX directory */ |
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.
Generally I approve this fix. Remove those definition from here instead of comment it.
Hi @nvlsianpu : Many thanks for your help. |
We got now this change (I would propose a separate commit for this logical set - removing those 2 defines) and another PR fixing it as well but came later after this one - #4647 @iotvietmember what would you suggest ? Rebase this to separate adding new target and fixing UART pins? |
I think that I can edit title to "Add support for the VBLUno51 board and Remove hardcode UART pins definitions for nRF51822 SoC" |
Hi @0xc0170, @nvlsianpu #4647 remove hardcode UART pin definitions for |
I confused numbers, great, both are then good to go :-) For future, any logical change should be in one commit - easier to review, revert in the future or bugfix than mixing different changes within one commit. |
I am really sorry. I do not have much experience with git. |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
@0xc0170 : I see the good results |
Email from Sarah Marsh (mbed): ************************************ Hi, Here is your daplink board ID: C006 The slug: VBLUNO51 When I execute mbedls, it looks like you have used the DAPLink ID for the NRF51_DK. You need your own unique ID. We are running the tests with the NRF51_DK ID mocked as your platform, but you will need to do the following to be mbed enabled: Please submit a PR against mbed-ls (https://github.com/ARMmbed/mbed-ls), so your board can be detected with our tools. Please also submit a PR against DAPLink (https://github.com/mbedmicro/DAPLink), so that your board is uniquely identifiable. Thanks, Sarah ************************************ The VBLUno51 board was added to mbed-os 5.5.2 released ARMmbed/mbed-os#4629 ARMmbed/mbed-os#4719 Signed-off-by: iotvietmember <[email protected]>
Sarah Marsh (mbed) said that the VBLUno51 board could use board ID is C006 The slug: VBLUNO51 The VBLUno51 board was added to mbed-os 5.5.2 released ARMmbed/mbed-os#4629 ARMmbed/mbed-os#4719 Signed-off-by: iotvietmember <[email protected]>
Email from Sarah Marsh (mbed): ************************************ Hi, Here is your daplink board ID: C006 The slug: VBLUNO51 When I execute mbedls, it looks like you have used the DAPLink ID for the NRF51_DK. You need your own unique ID. We are running the tests with the NRF51_DK ID mocked as your platform, but you will need to do the following to be mbed enabled: Please submit a PR against mbed-ls (https://github.com/ARMmbed/mbed-ls), so your board can be detected with our tools. Please also submit a PR against DAPLink (https://github.com/mbedmicro/DAPLink), so that your board is uniquely identifiable. Thanks, Sarah ************************************ The VBLUno51 board was added to mbed-os 5.5.2 released ARMmbed/mbed-os#4629 ARMmbed/mbed-os#4719 Signed-off-by: iotvietmember <[email protected]>
Email from Sarah Marsh (mbed): ************************************ Hi, Here is your daplink board ID: C006 The slug: VBLUNO51 When I execute mbedls, it looks like you have used the DAPLink ID for the NRF51_DK. You need your own unique ID. We are running the tests with the NRF51_DK ID mocked as your platform, but you will need to do the following to be mbed enabled: Please submit a PR against mbed-ls (https://github.com/ARMmbed/mbed-ls), so your board can be detected with our tools. Please also submit a PR against DAPLink (https://github.com/mbedmicro/DAPLink), so that your board is uniquely identifiable. Thanks, Sarah ************************************ The VBLUno51 board was added to mbed-os 5.5.2 released ARMmbed/mbed-os#4629 ARMmbed/mbed-os#4719 Signed-off-by: iotvietmember <[email protected]>
Sarah Marsh (mbed) said that the VBLUno51 board could use board ID is C006 The slug: VBLUNO51 The VBLUno51 board was added to mbed-os 5.5.2 released ARMmbed/mbed-os#4629 ARMmbed/mbed-os#4719 Signed-off-by: iotvietmember <[email protected]>
Description
This PR add new target for VBLUno51 board (TARGET_VBLUNO51)
Nordic nRF51822
Bluetooth Low Energy
DAPLink interface
Arduino UNO pinout compatible
4 Power
Uncyclo page
Status
READY
Migrations
NO
Test results
test_result_vbluno51.zip