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

uart usable after softdevice disabled?

SDK v12, SD130 on 51822.

I init uart through APP_UART_FIFO_INIT, and installed uart_event_handler. UART rx/tx with an external MCU works OK while softdevice running.

then i tried to use sd_softdevice_disable() to disable softdevice. I expect uart to work as the same. However the uart turns out not responding anymore, either not receiving or sending anything.

Is it normal? Is uart related API and event handler still usable after softdevice disabled? any specific thing need to do to keep uart running?

thank you.

Parents
  • Yes, if you're using the UART without any flow control, then you risk overflowing the RX buffer of the UART peripheral when there is a lot of BLE activity, i.e. the SD is using the CPU and blocking the application from emptying the buffer. The CPU wont go to sleep after you have disabled the SD unless you explicitly tell it to by calling __WFI(). The CPU will also not enter SYSTEM OFF mode unless explicitly told to do so, i.e. write to the SYSTEMOFF register. Are you able to perform a logic trace with a logic analyzer or oscilloscope of the UART lines after you have disabled the SD?

Reply
  • Yes, if you're using the UART without any flow control, then you risk overflowing the RX buffer of the UART peripheral when there is a lot of BLE activity, i.e. the SD is using the CPU and blocking the application from emptying the buffer. The CPU wont go to sleep after you have disabled the SD unless you explicitly tell it to by calling __WFI(). The CPU will also not enter SYSTEM OFF mode unless explicitly told to do so, i.e. write to the SYSTEMOFF register. Are you able to perform a logic trace with a logic analyzer or oscilloscope of the UART lines after you have disabled the SD?

Children
No Data
Related