Logging app core and net core on same UART peripheral.

Hi, 

Is it possible to use the same UART instance for app core and net core to put the log messages? I am using an nRF5340DK board, which uses a separate COM port for each core logging function.

Parents
  • Hello,

    The way that the peripherals work in the nRF5340 is that they need to belong to either the network core or the application core. So actually, it is not possible for both of them to access the same UART instance. Technically, you could use two UART instances, and short their TX pins together with some resistors, but that would turn into jibberish if (when) they try to write at the same time. 

    If you really want this, I think the way to go is to send a message from one core to the other, and then have that core push it out through the log. For this, you can look into the ipc service sample (ncs\nrf\samples\ipc\ipc_service). 

    But I imagine it is more work than just opening two UART terminals. 

    Best regards,

    Edvin

Reply
  • Hello,

    The way that the peripherals work in the nRF5340 is that they need to belong to either the network core or the application core. So actually, it is not possible for both of them to access the same UART instance. Technically, you could use two UART instances, and short their TX pins together with some resistors, but that would turn into jibberish if (when) they try to write at the same time. 

    If you really want this, I think the way to go is to send a message from one core to the other, and then have that core push it out through the log. For this, you can look into the ipc service sample (ncs\nrf\samples\ipc\ipc_service). 

    But I imagine it is more work than just opening two UART terminals. 

    Best regards,

    Edvin

Children
No Data
Related