Skip to content

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

Merged
merged 2 commits into from
Jun 29, 2017

Conversation

iotmember
Copy link
Contributor

@iotmember iotmember commented Jun 25, 2017

Description

This PR add new target for VBLUno51 board (TARGET_VBLUNO51)

  • VBLUno51 board:
    Nordic nRF51822
    Bluetooth Low Energy
    DAPLink interface
    Arduino UNO pinout compatible
    4 Power
    Uncyclo page

Status

READY

Migrations

NO

Test results

+ 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 */
Copy link
Contributor

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?

Copy link
Contributor Author

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 8
  • TARGET_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

Copy link
Contributor

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

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

Copy link
Contributor Author

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

Copy link
Contributor

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 !

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.

Copy link
Contributor

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"],
Copy link
Contributor

@0xc0170 0xc0170 Jun 26, 2017

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 ) ?

Copy link
Contributor Author

@iotmember iotmember Jun 26, 2017

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

Copy link
Contributor Author

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)?

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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/

@theotherjimmy theotherjimmy changed the title Add support for VBLUno51 board [TARGET_VBLUNO51] Add support for VBLUno51 board Jun 26, 2017
@iotmember
Copy link
Contributor Author

iotmember commented Jun 27, 2017

Hi @0xc0170 , @theotherjimmy : I hope that this PR would be merged soon. Many thanks for your help.

@nvlsianpu
Copy link
Contributor

@iotvietmember What with my comment on UART hardcoded pins definition remove?

@iotmember
Copy link
Contributor Author

Hi @nvlsianpu, our board uses Nordic nRF51822 but do not uses default config for UART communication.
RTS PIN: p12
CTS PIN: p13.

I think that should uses config in PinNames.h file

@nvlsianpu
Copy link
Contributor

@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 */
Copy link
Contributor

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.

@iotmember
Copy link
Contributor Author

Hi @nvlsianpu : Many thanks for your help.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 27, 2017

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?

@iotmember
Copy link
Contributor Author

I think that I can edit title to "Add support for the VBLUno51 board and Remove hardcode UART pins definitions for nRF51822 SoC"

@nvlsianpu
Copy link
Contributor

@0xc0170, @iotvietmember - It is also possible to put the removing to #4647. I will do it in a minute if you both want it.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 28, 2017

@0xc0170, @iotvietmember - It is also possible to put the removing to #4647. I will do it in a minute if you both want it.

It's @iotvietmember call - please let us know. I would suggest having a separate commit for this change within this patch. Thus either here or the 4647, that can do.

@iotmember
Copy link
Contributor Author

Hi @0xc0170, @nvlsianpu #4647 remove hardcode UART pin definitions for nRF52832. My commit will remove hardcode UART pin definitions for nRF51822

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 28, 2017

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.

@iotmember
Copy link
Contributor Author

I am really sorry. I do not have much experience with git.
Thanks for your help

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 28, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 674

All builds and test passed!

@iotmember
Copy link
Contributor Author

@0xc0170 : I see the good results

iotmember added a commit to iotmember/mbed-ls that referenced this pull request Jul 21, 2017
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]>
iotmember added a commit to iotmember/pyOCD that referenced this pull request Jul 21, 2017
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]>
iotmember added a commit to iotmember/DAPLink that referenced this pull request Jul 21, 2017
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]>
iotmember added a commit to iotmember/DAPLink that referenced this pull request Jul 21, 2017
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]>
c1728p9 pushed a commit to pyocd/pyOCD that referenced this pull request Jul 22, 2017
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]>
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.

6 participants