nRF5340 secure/non-secure mixture for OSC & CLK

Is it possible to mix a S (secure) LXFO source (driven by ext. 32K xtal) from the APP side for a NS (non-secure) LFCLK (32K). If so, how can this be achieved? Only NS is possible on the NET side. Or must an NS LXFO APP be the clock source for the NS NET LFCLK?

Parents
  • Hello,

    The LF clock can be requested from all domains, but they will all share the same clock source. Could you provide more information about what you are trying to achieve? Normally, Zephyr starts the LF clock during initialization before your program reaches main().

    Best regards,

    Vidar

  • Hi Vidar,

    Thanks for the quick answer.

    I'm new to the nRF5340, and have inherited a heap of code that I need to move away from Zephyr to FreeRTOS on the NET side. FreeRTOS is already running on the APP side.

    I was thinking specifically about (a) figure 18 and (b) §4.12.4 (Oscillators/Registers) in the nRF5340 product spec.

    So to reformulate the issue more precisely: if I want to provide a clock source for the LFCLK on the NET side I need to select a LFXO and I want to configure the XOSC32KI.BYPASS to disable the xtal bypass. Given that LFLCK on the NET side is in the NS domain only, and given that the osc. (S & NS) is only on the APP side, must I then configure the NS domain oscillator on the APP side? If the S domain osc. on the APP side is already configured (which is the case in the code I have inherited), how, if at all, can I use this for the NS domain LFCLK on the NET side? Or am I forced to provide an NS configuration of the osc. also?

    Best regards,

    Greg

  • Hi Greg,

    The oscillator registers are only accessible from the APPLICATION domain, which means the main application is responsible for configuring the OSCILLATOR. The NETWORK domain does however have access to the CLOCK registers, which it can use to request the LF clock. The network CPU does not have the TrustZone security extensions, so you don't have to worry about S and NS for this part of your FW.

    To request the LF clock on the netcore, it should be sufficient to configure CLOCK with the same configuriton used by the appcore and then trigger the TASKS_LFCLKSTART task.

    Best regards,

    Vidar

  • Hi Vidar,

    Thanks for the answer, and I think I know in which direction to go now. If I get stuck I'll ask again!

    Best regards,

    Greg

Reply Children
No Data
Related