MCU Clock and Peripheral Configuration

In the demo firmware of the LoRa sensor node, the internal 32MHz RC Oscillator is calibrated using DFLL to generate 48 MHz clock. The USB Start of Frame (SOF) is used as a reference for DFLL. The 48 MHz DFLL clock output is used for full speed USB operation. The DFLL clock is prescaled to operate the CPU at a 12 MHz frequency.

The following peripherals of the ATXmega256A3BU MCU are configured to perform the desired sensor node operation.