Issue trying to receive on a UART with rrf52833 and lots of other compiler/IDE questions

Folks,

Am running VSC 1.95.1 on Mageia Linux.

I have a  52833 board that I have working in that I can write to and read from custom BLE characteristics and send data out on the UART, but receiving is proving impossible.

Issue 1

The biggest issue is that in the UART callback function I'm constantly getting calls with UART_RX_DISABLED being the evt->type

static void uart_callback(const struct device *dev, struct uart_event *evt, void *user_data)
{
uint8_t i;

switch (evt->type)
{
case UART_TX_DONE: break;
case UART_TX_ABORTED: break;
case UART_RX_RDY:
for (i=0; i<evt->data.rx.len; i++)
{
serial_mess_in[mess_in_index++] = evt->data.rx.buf[i];
if (mess_in_index >= MESS_IN_SIZE)
mess_in_index = 0;
} break;
case UART_RX_BUF_REQUEST: set_uart_buffer(); break;
case UART_RX_BUF_RELEASED: break;
case UART_RX_DISABLED:
printk("callback: RX Disabled \n");
rx_enabled = false;
rx_enable(dev); break;
case UART_RX_STOPPED: break;
default:
printk("callback: other, go investigate\n");
break;
}

}
static void set_uart_buffer(void)
{
current_buffer ^= 0x01;
uint16_t sof;
sof = sizeof(rx_buff[current_buffer]);
uart_rx_buf_rsp (cuteU, &rx_buff[current_buffer][0], RX_BUFF_SIZE);
}
Issue 2
I get these errors but it still compiles:

    "message": "cannot open source file \"stddef.h\" (dependency of \"zephyr/types.h\")",

Similarly for stdbool
Issue 3
I get these sorts of errors:

    "message": "ignoring malformed line 'CONFIG_ARM_MPU=y'",
For every line in nrf52833dk_nrf52833_defconfig. I saw one post stying there was a superfluous space, that that's not the case here:


# SPDX-License-Identifier: Apache-2.0

# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# Enable RTT
CONFIG_USE_SEGGER_RTT=y

# enable GPIO
CONFIG_GPIO=y

# enable uart driver
CONFIG_SERIAL=y

# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
Issue 4
I can't debug properly, if you set a breakpoint it jumps all over the place and tells you variables are optimised out when I have chosen optimise for debugging in sys build.
Issue 5
Am wondering whether this line:
k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));
Is causing an issue in that I wonder whether it's putting the unit to sleep and screwing up the UART? Is the re like an equivalent to FreeRTOS vTaskDelay() where you're delaying but not putting the unit to sleep?
Issue 6
[{
    "resource": "/home/XXXXX/ncs/v2.7.0/zephyr/boards/nordic/nrf52833dk/nrf52833dk_nrf52833_defconfig",
    "owner": "Kconfig no context",
    "severity": 4,
    "message": "The active build context 'build/BLE_LBS' does not use this file.",
    "startLineNumber": 1,
    "startColumn": 1,
    "endLineNumber": 1,
    "endColumn": 1
}]

What does this mean and is it an issue?

Issue 7
[{
    "resource": "/home/XXXXXX/ncs/v2.7.0/zephyr/CMakeLists.txt",
    "owner": "nrf-connect",
    "severity": 4,
    "message": "CMake Warning at /home/robertw/ncs/v2.7.0/zephyr/CMakeLists.txt:2027 (message):",
    "source": "cmake",
    "startLineNumber": 2027,
    "startColumn": 1,
    "endLineNumber": 2027,
    "endColumn": 2147483647
}]
Thanks!
Related