NRF5340: MCU Boot + SMP server callbacks

Hello, 

we use nrf5340 with Connect SDK v2.0.0 and we have adopted rules for indicating the update process and the operation of the bootloader in the device. Therefore, I would like to know:

  1. How can I understand that a connection to the server has occurred? Is it possible to assign a custom callback to SMP server running events?
  2. Similar question for bootloader. Is there a possibility (regular, without editing the sources) to obtain information about the process of transferring an image from one slot to another?
  3. To keep the device running, I need to generate a PWM signal (feature of the circuit). Accordingly, I need to start the PWM module before entering the MCU boot, but I didn't find a way to do it.   I know that it is possible to request a function call before the Zephyr kernel (SYS_INIT(pwmOutInit, PRE_KERNEL_2, 0);) starts, but this call again occurs after the MCU boot has started. Do I need to write my own power driver and replace the existing Zephyr? Or is it possible again to get access directly at the time of launching the MCU? 

Thanks

Related