I have a setup similar to this
void program_uart_cb(struct uart_event *evt, void *data)
{
printk("before");
nrf_sec_tag_t sec_tag = (nrf_sec_tag_t) sec_tag_list[0];
nrf_inbuilt_key_write(sec_tag,
NRF_KEY_MGMT_CRED_TYPE_CA_CHAIN,
"Hello",
strlen("Hello"));
printk("after");
}
void main(void)
{
struct device *uart = device_get_binding("UART_1");
uart_callback_set(uart, program_uart_cb, uart);
uart_rx_enable(uart, rx_buf, sizeof(rx_buf), 50);
while (true) {
k_sleep(100);
}
}
When the callback is executed, the execution will enter the inbuilt_key function and then the output will stop and the execution will halt. This seems to be the case for all nrf_inbuilt_key functions. Any help would be appreciated, thanks.