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

Send serial commands over GPIO on nRF52832

Hello, I'm having a trouble over here, I read some tutorials for creating custom services and characteristics for BLE, and everything is running fine, I have a service with a characteristic that hold some text in hex (uint8_t), and I set the permissions to read/write that characteristic, now, i want to send a serial command over one of the GPIO ports, and I'm using the nRF52 DK so I'm using the P0.06 (TXD) and P0.08 (RXD), but I don't have a clue how to send the serial command to those GPIO ports, I need to send a command for a nextion TFT screen, to change a value, so I need to send a text first like (t0.val="test") and then 0xFF three times so the screen will read the commands.

How do I do that on the nRF52832?, I saw a UART example on the SDK but I cannot understand it very well, I don't want to establish a deep connection, just send some commands, and I might also point that I'm a beginner on C programming.

Parents
  • Hi,

    The UART example is one of the recommended starting points for implementing UART connections to external devices. The documentation for how to test the example can be found here. Can you explain in more detail what it is you are not understanding? Note that P0.06 and P0.08 is by default connected to the on-board debug chip on the DK, to allow sending data through virtual COM port to PC. If you want to interface external device, it would be better to use different GPIOs.

    Best regards,
    Jørgen

Reply
  • Hi,

    The UART example is one of the recommended starting points for implementing UART connections to external devices. The documentation for how to test the example can be found here. Can you explain in more detail what it is you are not understanding? Note that P0.06 and P0.08 is by default connected to the on-board debug chip on the DK, to allow sending data through virtual COM port to PC. If you want to interface external device, it would be better to use different GPIOs.

    Best regards,
    Jørgen

Children
Related