I am completely confused by the nRF51 UART. I'm trying to port code originally written for an STM32 (another cortex chip). There, I define an interrupt, enable the RXRDY or TXEMPTY interrupts, and if a character comes in, I get an interrupt, or if I send a character, I get an interrupt as soon as it leaves the TX register and enters the shift register. Simple, and it just works.
I'm trying to do the same here, but can't get the IRQ routine to fire at all. I'm using the PCA10028 dev kit, pins 9 and 11 as RX and TX, don't need flow control, and soft device 110 and SDK 7.
I assume my problem has something to do with the PPI interface, but can't wrap my head around things like STARTTX, STARTRX or events. Can you use the UART without these, and just use INTENSET and INTENCLR? Or are these required?
I looked at the uart examples, but none of these looked, to me, suited for the kind of serial I/O I need to perform. The uart example doesn't use IRQ, so it doesn't look suitable as a starting point. Neither does the experimental_ble_app_uart example, as it too uses simple, non interrupt uart code.
Plus, despite having "uart" in their project names, almost none of the examples actually send or receive anything over the UART, unless it is debug data via printf, which is certainly not what I'm looking to do.
Any hints on how to take control of the UART?
Thanks, Jeff.