This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UART communication using nRH52840

  1. I am a newbee to nrf 52840..I saw lot of documents and got confused on where to start ..indly guide me on this
  2. we are trying nrf52840 dev kit as we are using nrf52840 in our custom board
  3. Let me know how can start for UART communciation using this dev Kit
  4. Kindly let me know the procedures
  5. Also if I plan to use custom board for this..let me know how we can program for incoming BLE msg to be sent via UART..

Kindly let me know

Thanks and regards

Ravi chandran

Parents
  • Hi,

    Start with our lp-UART example in NCS or UART example in nRF5SDK. Documentation for the peripheral can be found here,

    regards

    Jared 

  • Hi,

    Thanks for your reply.I tried unboxing the Dk kit with pulsating example which was preinstalled ..I was able to control the LED's.after this I copied J-Link OB-SAM3U128-V2-NordicSemi 170724.bin to check for the flashing LED example.

    Now I cannot go back to previous one.

    what I need to know is should I install Segger Embedded studio to run the IDE....I need to know which IDE  I can install so that I can run the examples by flashing.

    IDE where I can code (pre installed code if any), compile and run ..similar to an IDE.Kindly let me know

    Like this if I already have UART example I shall modify the same and flash the hex file.Kindly guide me 

    regards

    Ravi chandran

  • Hi elfving,

    I am just planning to move to bare metal way of working using nRF52840...just let me know what are all the required files for these..I am trying to install SEGGER embedded studio..once completed I will let you know....

    1.downloaded SDK S113 along with nRF nRF5_SDK_17.0.2_d674dde
    2.inside nRF5_SDK_17.0.2_d674dde \examples\peripheral\UART you have UART example
    3. PCA10056 corresponds to nRF 52840 , there are arm packages..

    Once SEGGER Is installed...can we flash the UART hex file in the hex folder directly.

    what is th flashing tool used here??

    let me know

    thanks

    Ravi

  • Hey again,

    Yes, some of the examples in the nRF5 SDK come with precompiled hex files for various boards. I thought you wanted to use NCS though, but if getting something precompiled is enough for you then go ahead.

    In order to flash the hex file you acctually only need the commandline tools. Open a terminal in the folder with the hex file you need, with the board connected, and run:

    nrfjprog -f NRF52 --program myapp.hex

    For more on this see here.

    sravich1 said:
    I am just planning to move to bare metal way of working using nRF52840

    Well simply flashing pre-made hex files is very bare metal, though if you are planning on using changing and compiling your own versions I would recommend installing NCS. It is actually a pretty bare metal solution.

    As there was something wrong with your previous installation, I would recommend you to  remove this installation completely and try it one more time. An active VPN connection or firewall could possibly block the necessary downloads from GitHub. Additionally, my personal recommendation would be to stick with the default installation path.

    Regards,

    Elfving

  • Hey ,

    thanks for your valuable inputs..as you said I would like to go to NCS..so that in future I thought this would help as we move on with improved versions of BLE.

    But our current requirement as I had mentioned earlier is as follows

    1. nRF52840 BLE chip to run the BLE with UART connected to our custom board STM.

    2. STM sends messages to BLE through UART and from BLE further to some APP.

    3. Also their will be messages from App to BLE to STM

    4.I might have to change the UART pins since our custom board connected to different pins

    For these I thought bare metal is more than enough.

    1. I have now installed SEGGER embedded studio and ran the BLE_peripheral example

    2. I am trying to connect to nRF_UART and check the same whether this would work..Hope!!

    3. Then I need to change for respective UART and try to see if this works.

    Hope My path is correct just let me know

    regards

    Ravi

  • Hi Elfving,

    Using the bare metal and downloading nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_uart

    Then compiling in SEGGER embedded studio I was able to run the hex file.

    Then using nRF connect App using mobile I was able to pair BLE and send and Receive data.

    I think this uses default pin for UART and my used case required P0.05,P0.06 pins as BLE UART Rx andTx.How can I change the PIN Numbers..I did scan in main.c UART_INT.

    .rx_pin_no = RX_PIN_NUMBER,
    .tx_pin_no = TX_PIN_NUMBER,
    .rts_pin_no = RTS_PIN_NUMBER,
    .cts_pin_no = CTS_PIN_NUMBER,
    .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
    .use_parity = false,

    I was not able to find which .h files I need to change these.

    Let me know how I can proceed from here.

    regards

    Ravi 

  • Hello,

    That seems to just be a dummy values for compilation purposes. You can find them in components/boards/d52_starterkit.h.

    You should be able to change them to whatever you need to.

    Best regards,

    Elfving

Reply Children
  • Hi Elfving,

    Thanks for your response.In the current project with ble_App_UART_pca10056

    I am not seeing d52_started.h..is this called internally??...also there is pca_10056.h should I change here

    in d52_starter.h

    // serialization CONNECTIVITY board
    #define SER_CON_RX_PIN 22 // UART RX pin number.
    #define SER_CON_TX_PIN 23 // UART TX pin number.
    #define SER_CON_CTS_PIN 25 // UART Clear To Send pin number. Not used if HWFC is set to false.
    #define SER_CON_RTS_PIN 2 // UART Request To Send pin number. Not used if HWFC is set to false.

    is this the place to change?? if this can be accessed internally from the project.

    Also according to the development board p0.05,p0.06,p0.07,p0.08 used for UART..

    but I want to use only Tx and Rx pin in p0.06 and p0.08..will we get UART signals if I change to these values.

    let me know

    Thanks and regards

    Ravi 

  • Hello,

    sravich1 said:
    is this the place to change?? if this can be accessed internally from the project.

    I believe you could change this directly in your project as well, and that would make it easier for you.

    sravich1 said:
    but I want to use only Tx and Rx pin in p0.06 and p0.08..will we get UART signals if I change to these values.

    I don't know if I understand your issue here. Could you expand on this?

    Regards,

    Elfving

  • Hi ELfving,

    I would like to connect nRF52840 development board UART to my custom board UART.

    To achieve this I also need to know to which pin I am connecting

    In our design we would like to connecte STM UART to p0.5 and p0.06 pins.

    Now the UART output that comes when I connect putty is from same pins??

    If not,Then How do I change to P0.05 and P0.06 pins??

    which file or .h files has these pins reference so that I can change and build.

    Kindly let me know that the query.

    you said initially d52_starter.h which I could not find in the BLE_peripheral_App project.

    so would like to know name of the .h file where I can change to check the output.

    Thanks

    Ravi

  • Hi ELfving,

    My bluetooth connects when I connect with nRF connects Bluetooth App but not with nRF UART 2.0

    or any other Bluettoth terminal App....I get connect and disconnects immediately..how to get this working for any 3rd party App also??..any code changes we need to enable let me know

    Thanks

    Ravi

  • Hi Elfving,

    Any update on the 3rd party App query I had asked earlier..kindly let me know.

    Thanks

    Ravi

Related