This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 UARTE1 Interrupt Crashes in MBR Region

I'm working on a project where UART0 is used as a nrf logger uart back-end.  Recently I've tried adding UARTE1 to the project to implement additional serial communications, but I'm running into some issues.  After much trial and error I've attempted to implement this using nrf_drv_uart

1. If no event handler is passed into nrf_drv_uart_init, I'm able to output data on UARTE1 using the blocking mode.

2. If I pass in an event handler in the nrf_drv_uart_init, whenever the first transmission is finished, the device halts.  Debugging shows that it is trying to execute at 0xA60.  According to breakpoints being set, my event handler is never called.

I'm hoping there's a simple configuration issue or interrupt handling I just need to set properly.  Eventually I'd like to also use it for receiving in a non-blocking manner.  I'm using SDK 15.3 with the 6.1.1 softdevice.  If needed, I can try to make a minimal program that reproduces this effect.

Update - I have attempted to modify the example "ble_app_ancs_c" (pca10056) to add UARTE1 to it since it already has BLE and nrf log setup.  While it doesn't show the issue I'm having in the main project, UARTE1 doesn't properly receive data.  I have attached my modified main and sdk_config files as that's all I needed to touch.  Note: I disabled the button presses because I currently don't have my dev board, but this runs on my prototype.  If the pins selected for UARTE1 have issues, please let me know.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
* Copyright (c) 2012 - 2019, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sdk_config.h