This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52832 dk UART problem

Hi,
I just recently bought nrf52832 dk board. I am really new to this. I have prior experience on Arduino only. I started working on nrf52832 dk board with the help of nordic infocenter.
I have installed nRFgo Studio, nrf connect, Keil uVision5, nrf command line toolbox, J-link software. I know how to upload softdevice and then application code. Basically i am going step by step as written in infocenter. Now i am stuck at UART. When i tried example ble-app_UART and when i opened puTTY data which i am receiving is ▒▒. I am sending data over puTTY using nordic connect in my mobile. Every time i write anything i am getting ▒▒ . Also i have checked puTTY translation it is using UTF-8. I have also set baud rate to 115200. I am unable to figure out problem.

Parents
  • Hello,

    Can you please try to flash the DK with the attached .hex file?

    It should print "Hello World" on the UART every second. Connect open puTTY on "Serial", select the correct COM port, and with baud rate 115200. You should only need to use the USB cable connected to the DK, and no external HW. If you still only get the ▒▒, then maybe you can try a different UART terminal, like Termite.

    When you flash the .hex, you can use nRFgo Studio. Remember to clear the board first ("Erase all"), because the attached application doesn't require a softdevice.

     

    Let me know whether that works or not, then we know whether the issue is on the application or the Desktop Firmware.

    nrf52832_xxaa.hex

     

    Best regards,

    Edvin

  • Thanks for the help.
    Yes it is printing "Hello World" at baud rate of 115200. I also figured out that the code written in ble-app UART works on baud rate 38400 in my case. Now it is working. Also I would like to learn programming nrf52832 from basics like how to write code, what are the headers required for the particular code,code which need to be implemented in setup, so is there any document or site where i can learn to code nrf52832?


    Thank You

  • Hello,

    The baud rate is set in the source code. Look for the uart_init() function in main.c

    The tutorials site is a good place to start.

    Especially the four posts under "Bluetooth low energy" is useful if you intend to work with BLE. I know they are old, mostly referring to SDK 11. But you can use them to get familiar. Just be aware that the application "Master Control Panel" is depricated. You should use nRF Connect instead. It doesn't show the same details in advertising packets, but you should manage to get through the tutorials. 

     

    There are quite a few header files required to compile code for the nRF, so I think you should start with the template projects in the SDK:

    SDK\examples\ble_peripheral\template_project, and

    SDK\examples\peripheral\template_project

     

    But I recommend that you start with some of the examples with some actual code and modify them in the getting started phase.

     

    If you don't use the softdevice, e.g. the examples in SDK\peripheral, then you can start with the blinky example, which has the necessary files included, and it is pretty clear to see what the code does.

     

    Best regards,

    Edvin

Reply
  • Hello,

    The baud rate is set in the source code. Look for the uart_init() function in main.c

    The tutorials site is a good place to start.

    Especially the four posts under "Bluetooth low energy" is useful if you intend to work with BLE. I know they are old, mostly referring to SDK 11. But you can use them to get familiar. Just be aware that the application "Master Control Panel" is depricated. You should use nRF Connect instead. It doesn't show the same details in advertising packets, but you should manage to get through the tutorials. 

     

    There are quite a few header files required to compile code for the nRF, so I think you should start with the template projects in the SDK:

    SDK\examples\ble_peripheral\template_project, and

    SDK\examples\peripheral\template_project

     

    But I recommend that you start with some of the examples with some actual code and modify them in the getting started phase.

     

    If you don't use the softdevice, e.g. the examples in SDK\peripheral, then you can start with the blinky example, which has the necessary files included, and it is pretty clear to see what the code does.

     

    Best regards,

    Edvin

Children
No Data
Related