TI中文支持网
TI专业的中文技术问题搜集分享网站

关于CC1310串口底层接收缓存区溢出

/* UART objects */
UARTCC26XX_Object uartCC26XXObjects[CC1310DK_5XD_UARTCOUNT];
unsigned char uartCC26XXRingBuffer[CC1310DK_5XD_UARTCOUNT][1024];

/* UART hardware parameter structure, also used to assign UART pins */
const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[CC1310DK_5XD_UARTCOUNT] = {
{
.baseAddr = UART0_BASE,
.powerMngrId = PowerCC26XX_PERIPH_UART0,
.intNum = INT_UART0_COMB,
.intPriority = ~0,
.swiPriority = 0,
.txPin = UART_TX,
.rxPin = UART_RX,
.ctsPin = PIN_UNASSIGNED,
.rtsPin = PIN_UNASSIGNED,
.ringBufPtr = uartCC26XXRingBuffer[0],
.ringBufSize = sizeof(uartCC26XXRingBuffer[0])
}
};

1. 上方代码中的数组uartCC26XXRingBuffer是否是CC1310的SDK的接收缓存区?

2. 如果是的话,如果CC1310一次接收的数据超过了缓存区的大小,底层是如何处理的?是否会出现死机的情况?

user5360734:

/* UART objects */UARTCC26XX_Object uartCC26XXObjects[CC1310DK_5XD_UARTCOUNT];unsigned char uartCC26XXRingBuffer[CC1310DK_5XD_UARTCOUNT][1024];

/* UART hardware parameter structure, also used to assign UART pins */const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[CC1310DK_5XD_UARTCOUNT] = { { .baseAddr = UART0_BASE, .powerMngrId = PowerCC26XX_PERIPH_UART0, .intNum = INT_UART0_COMB, .intPriority = ~0, .swiPriority = 0, .txPin = UART_TX, .rxPin = UART_RX, .ctsPin = PIN_UNASSIGNED, .rtsPin = PIN_UNASSIGNED, .ringBufPtr = uartCC26XXRingBuffer[0], .ringBufSize = sizeof(uartCC26XXRingBuffer[0]) }};

1. 以上所示的代码中,数组uartCC26XXRingBuffer是否就是CC1310底层的接收缓存区?

2. 如果是的话,如果芯片一次接收的数据量大于接收缓存区的大小,底层会如何处理?是否胡出现死机的情况?

Kevin Qiu1:

回复 user5360734:

接收缓冲区看下面

UART_Handle handle; * UART_Params params; * uint8_t rxBuf[100]; // Receive buffer * uint32_t timeoutUs = 5000; // 5ms timeout, default timeout is no timeout (BIOS_WAIT_FOREVER) *

超过缓冲区大小会出现异常

赞(0)
未经允许不得转载:TI中文支持网 » 关于CC1310串口底层接收缓存区溢出
分享到: 更多 (0)