I want to use nRF52-DK for receiving data over UART and send it over BLE link so I loaded the ble_app_uart but hard fault occurs immediately in these circumstances -
1. If input baud rate is different than the baud rate set in the app
2. If UART is receiving while the device boots
3. If UART data in received continuously
The first problem can be fixed easily but I cannot understand why the CPU is crashing instead of may be interpreting the data as junk like Arduino. The second problem is the same kind of problem but I can live with that. I cannot understand why the third one is happening and without it I cannot make my project work. I am using another microcontroller to send data over UART which consists of strings separated by new line. The peculiar thing is that when I put 50ms or more delay between two strings then everything works fine and I can receive data via nRF connect but if I reduce or remove the delay, the app immediately crashes when I connect the UART line. These solutions I have tried till now -
1. Migrating from SDK 15.1 to 15.2
2. Reducing UART baud rate from 115200 to 9600
3. Pulling up Rx line like suggested in this - https://devzone.nordicsemi.com/f/nordic-q-a/29183/ble_app_uart-crashes-with-error-4-nrf_error_no_mem
4. Increasing FIFO Rx buffer from default 256 to 1024
5. Commenting out BLE initialization
None of these seems to work. I am using SES and here's the log -
I apologize for uploading photos but I don't know how to convey this information better. I can also upload the main file but since I've only changed the buffer size and baud rate in the example it may not be necessary.