hello,
i am using nrf52832 with sensor which uses uart communication and using sdk 15.2
int main(void)
{
uint32_t err_code;
uint8_t readbuf[50];
uint8_t buf[10];
buf[0]=0x49;
uint8_t buf_len=0;
uint8_t buf_r[10];
bsp_board_init(BSP_INIT_LEDS);
const app_uart_comm_params_t comm_params =
{
RX_PIN_NUMBER,
TX_PIN_NUMBER,
RTS_PIN_NUMBER,
CTS_PIN_NUMBER,
UART_HWFC,
true,
#if defined (UART_PRESENT)
UART_BAUDRATE_BAUDRATE_Baud4800
};
APP_UART_FIFO_INIT(&comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_error_handle,
APP_IRQ_PRIORITY_LOWEST,
err_code);
APP_ERROR_CHECK(err_code);
nrf_drv_uart_rx_enable(&app_uart_inst);
err_code=nrf_drv_uart_rx(&app_uart_inst, readbuf, 50);
if (err_code == NRF_SUCCESS)
{
printf("initialising sucesss rx\n");
}
nrf_drv_uart_tx(&app_uart_inst, buf, 1);
nrf_drv_uart_rx(&app_uart_inst, buf_r, 4);
printf("%x\n",buf_r[0]);
printf("%x\n",buf_r[1]);
printf("%x\n",buf_r[2]);
printf("%x\n",buf_r[3]);
} but i could not get my excepted values in rx buffer which is of 3 bytes and values are 0x55,0x79,0x00 i want to know if i can get up to 3 bytes using this err_code = nrf_drv_uart_rx(&app_uart_inst, readbuf, 3); and i have attached my sdk config file with this 4478.sdk_config.txt
thanks and regards
manikandan v