Hi Andrew, the example is the arduino primo BSP. Take a look at hw/bsp/arduino_primo_nrf52/src/hal_bsp.c, specifically the setup of UART0 and UART1.
UART0 uses HAL uart driver, while UART1 sets up bitbanger. > On Jan 30, 2017, at 3:21 PM, Andrew Tam <[email protected]> wrote: > > I'm currently looking into using the 2nd UART as well, I was doing some > reading on the nrf52dk pins and looks like pins P0.22 / P0.23 / P0.24 / > P0.25 could also be good options. > > I'm curious to know if there was some example code as to how you set this > up on the nrf52? > > Thanks, > > - Andrew - > > > > On Wed, Jan 11, 2017 at 10:17 AM, marko kiiskila <[email protected]> wrote: > >> I did operate it only Arduino Primo, where the 2nd UART was my console >> (or maybe it was the connection to ESP8266?). >> >> Looks like the pins used on that BSP are 11 and 12. >> I would pick whichever is most easily accessible from the connector :) >> >>> On Jan 11, 2017, at 6:57 AM, David G. Simmons <[email protected]> wrote: >>> >>> >>>> On Jan 10, 2017, at 12:02 PM, marko kiiskila <[email protected]> wrote: >>>> >>>> I’ve tested the bitbanger on nrf52 with up to 19200 as my console. >>>> If I remember correctly, the hal timer used by the bitbanger was running >>>> at 1MHz. >>> >>> >>> What pins on the NRF52dk are you using? The syscfg.yml has only >>> UART_1: >>> description: 'Bitbanger UART' >>> value: 0 >>> >>> defined for UART_1 so I'll need to configure pins for UART_0_PIN_TX and >> UART_0_PIN_RX: >>> >>> Suggestions? >>> >>> dg >>> -- >>> David G. Simmons >>> (919) 534-5099 >>> Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • >> Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter < >> http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs> >>> /** Message digitally signed for security and authenticity. >>> * If you cannot read the PGP.sig attachment, please go to >>> * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!! >>> * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/> >>> **/ >>> ♺ This email uses 100% recycled electrons. Don't blow it by printing! >>> >>> There are only 2 hard things in computer science: Cache invalidation, >> naming things, and off-by-one errors. >>> >>> >> >>
