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

How to use send and receive serial data over gpio pins?

Hi,

I am stuck in sending and receiving serial data over Rx and Tx in nrf51 DK. I used arduino to prototype a fingerprint access control system. Now I am shifting to nrf51 using 12.3 SDK, It was easy to send and receive serial data over Rx and Tx in arduino using Software Serial. How to do it in nrf51? the baud rate for fingerprint sensor is different from the ble_app_uart example. The sensor uses 9600 baud rate ,UART (TLL logical level) and for communication uses data package array of size 11-14 bytes to send and receive communication, for example the format is

Could I get help in tools or advice to do this in nrf51?

Parents Reply
  • Software serial requires the CPU to be available to read/write the GPIOs at the exact time that the bits are received. In a single-core BLE SoC like the nRF51, the CPU will always have highest priority to handle timing-critical events. The UART peripheral in nRF51 series ICs has a built-in HW FIFO that allows you to receive up to 6 bytes without CPU intervention.

    You may be able to do those low baudrates with bit-banging/software serial, but there is no guarantee that it will work. I would rather recommend using the HW UART peripheral for supported baudrates.

Children
No Data
Related