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
  • The main problem of sharing a resource is who gets to use it when two people want to write to it. You would need to include something in the output driver that throws away messages from the net core when the app core uses it (or the other way around). If you want messages from both then it gets more difficult, with the need for some kind of queue and some task that processes that queue. Then the log messages need to write to queue in an efficient and safe way. 

    It's doable but you may need to create something to handle it. 

    Now that I typed this, I wouldn't be surprised if this is handled some way in zephyr. Maybe search the documentation and see if there is resource sharing on multiple core support.

Reply
  • The main problem of sharing a resource is who gets to use it when two people want to write to it. You would need to include something in the output driver that throws away messages from the net core when the app core uses it (or the other way around). If you want messages from both then it gets more difficult, with the need for some kind of queue and some task that processes that queue. Then the log messages need to write to queue in an efficient and safe way. 

    It's doable but you may need to create something to handle it. 

    Now that I typed this, I wouldn't be surprised if this is handled some way in zephyr. Maybe search the documentation and see if there is resource sharing on multiple core support.

Children
No Data
Related