PebbleOS v4.47.0-1075-g013613c8a
Loading...
Searching...
No Matches
nRF54L

UART driver for the nRF54L UARTE peripheral. More...

Data Structures

struct  pbl_uart_nrf54l
 nRF54L serial port. More...
 

Macros

#define PBL_UART_NRF54L_RX_BUF_SIZE   256U
 Size of the receive buffer, in bytes.
 
#define PBL_UART_NRF54L_DEFINE(sym, _name, _base, _irq, _baudrate, _tx, _rx)
 Define a serial port on an nRF54L UARTE instance.
 

Functions

void pbl_uart_nrf54l_irq_handler (const struct pbl_uart_nrf54l *uart)
 UARTE interrupt handler, connected by PBL_UART_NRF54L_DEFINE().
 

Detailed Description

UART driver for the nRF54L UARTE peripheral.

Bytes are sent one at a time through EasyDMA. Reception runs through EasyDMA into the two halves of a receive buffer in turn, each ending when its half is full or the line idles: only then does EasyDMA write out the bytes it holds. Odd parity and flow control are not supported.

TX is an output, idle high. RX is an input with its wiring flags, e.g. a pull, connected when reception first starts. An instance connects its interrupt itself, with priority CONFIG_UART_NRF54L_IRQ_PRIO:

PBL_UART_NRF54L_DEFINE(s_uart20, "uart20", 0x500c6000, PBL_SOC_IRQN_SERIAL20, 115200,
PBL_GPIO(&dt_gpio1, 4, 0), PBL_GPIO(&dt_gpio1, 5, 0));
#define PBL_GPIO(_port, _pin, _flags)
Initializer for a struct pbl_gpio.
Definition gpio.h:158
#define PBL_UART_NRF54L_DEFINE(sym, _name, _base, _irq, _baudrate, _tx, _rx)
Define a serial port on an nRF54L UARTE instance.
Definition nrf54l.h:73

Data Structure Documentation

◆ pbl_uart_nrf54l

struct pbl_uart_nrf54l

nRF54L serial port.

Data Fields
uintptr_t base Registers.
pbl_irq_t irq Interrupt line.
struct pbl_gpio rx RX pin.
struct pbl_uart_nrf54l_state * state Driver runtime state.
struct pbl_gpio tx TX pin.
struct pbl_uart uart Serial port.

Macro Definition Documentation

◆ PBL_UART_NRF54L_DEFINE

#define PBL_UART_NRF54L_DEFINE (   sym,
  _name,
  _base,
  _irq,
  _baudrate,
  _tx,
  _rx 
)
Value:
static struct pbl_uart_nrf54l_state sym##_nrf54l_state; \
PBL_DEVICE_INSTANCE(sym, struct pbl_uart_nrf54l, struct pbl_uart, uart){ \
.uart = PBL_UART_INIT(sym, _name, nullptr, &pbl_uart_nrf54l_ops, _baudrate), \
.state = &sym##_nrf54l_state, \
.base = (_base), \
.irq = (_irq), \
.tx = _tx, \
.rx = _rx, \
}; \
PBL_IRQ_CONNECT_NUM(_irq, CONFIG_UART_NRF54L_IRQ_PRIO, pbl_uart_nrf54l_irq_handler, &sym##_inst, \
0)
nRF54L serial port.
Definition nrf54l.h:43
void pbl_uart_nrf54l_irq_handler(const struct pbl_uart_nrf54l *uart)
UARTE interrupt handler, connected by PBL_UART_NRF54L_DEFINE().
A serial port.
Definition uart.h:135
#define PBL_UART_STATE_DEFINE(sym)
Define the class state of port sym, for the PBL_UART_*_DEFINE() macro of a driver.
Definition uart.h:151
#define PBL_UART_INIT(sym, _name, _parent, _ops, _baudrate)
Initializer for the struct pbl_uart of port sym.
Definition uart.h:164

Define a serial port on an nRF54L UARTE instance.

Parameters
symSymbol of the port.
_nameName.
_baseRegisters.
_irqInterrupt line.
_baudrateInitial baud rate, in bits per second.
_txTX pin, from PBL_GPIO().
_rxRX pin, from PBL_GPIO().

◆ PBL_UART_NRF54L_RX_BUF_SIZE

#define PBL_UART_NRF54L_RX_BUF_SIZE   256U

Size of the receive buffer, in bytes.

Function Documentation

◆ pbl_uart_nrf54l_irq_handler()

void pbl_uart_nrf54l_irq_handler ( const struct pbl_uart_nrf54l *  uart)

UARTE interrupt handler, connected by PBL_UART_NRF54L_DEFINE().

Parameters
uartPort.