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

nRF52 uart problems with errors 4 and 8

Hi,

I have a Rigado BDM-300 (nRF52832) on a small custom board. Using SDK 13.1 with SD132 v4.0.2.

I've taken a template project and adjusted it to my needs. I can get my services there, connect to the board with mobile device, etc...so I know board and application in that state work. I have experience with nRF51 so all that was not a problem.

But, when trying to add UART things go haywire. I've used UART setting from "ble_peripheral\ble_app_uart" example, FIFO is used.

After UART is initialized it throws APP_UART_COMMUNICATION_ERROR in it's handle. Errors I get from p_event->data.error_communication are 4 and 8, first 4 is thrown, then 8 immediately after.

I've disabled nrf logging (not using uart or RTT for nrf log) and I've enabled RTT, so uart channel should not be used for logging.

Is it possible that NRF_LOG calls in other files could be messing with uart? I'm out of ideas, I will try to configure NRF_LOG to use RTT and see what happens, but everything I've tried so far failed to work. I've also tried to disable EasyDMA and use only legacy but I get the same errors.

Thanks!

Parents
  • FormerMember
    0 FormerMember

    If there is no 32 kHz crystal connected to pin 0 and 1, there shouldn't be any problem to use those pins as GPIOs.

    In your code, do you have set the LFCLK crystal source to the internal RC oscillator? If not, could you do so, and check if it changes anything?

  • Still nothing. I've managed to add Segger RTT to logging @ template project. After that I added UART stuff from UART ble example. When pins 0 and 1 are used for UART I still get error 4 and 8. When using pins 23 and 24 no such errors. In both cases I don't have a working UART. I't not sending anything. I can compile the program and run it, there are no compile errors or execution errors, but when using "app_uart_put" function I get nothing out.

Reply
  • Still nothing. I've managed to add Segger RTT to logging @ template project. After that I added UART stuff from UART ble example. When pins 0 and 1 are used for UART I still get error 4 and 8. When using pins 23 and 24 no such errors. In both cases I don't have a working UART. I't not sending anything. I can compile the program and run it, there are no compile errors or execution errors, but when using "app_uart_put" function I get nothing out.

Children
No Data
Related