Does EVAL-ADICUP360 have 32.768kHz crystal oscillator ?

Hi,

I have tested EVAL-ADICUP360.

In BOM file, Abracon ABS07-32.768kHz oscillator is described.

Does this oscillator working on EVAL-ADICUP360 ?

I can not find the proper example code. 

I also changed github example codes to use this 32.768kHz oscillator.

However, I just find out bricking if I choose the option for this oscillator. 

  • +1
    •  Analog Employees 
    on May 17, 2021 1:43 PM

    Hello,

    The ADICUP360 does have a 32kHz crystal and you can set the MCU to use it as clock source.

    First enable the I think you must first enable the oscillator circuitry using: `status = XOSCCfg(CLK_XON);` and make sure status is 1.

    Second set the frequency variable properly using: `SetSystemExtClkFreq(__XTAL);`.

    Third, set system clock source to external oscillator with: `ClkCfg(CLK_CD0, CLK_LFX, CLKSYSDIV_DIV2EN_DIS, CLK_UCLKCG);`.

    Let me know if this works for you.

    Regards,
    Andrei

  • Dear andreid1994

    Many thanks to your kind response.

    I have used EVAL-ADICUP360  and EVAL-ADXL355 PMDZ (PMOD). 

    I tested it according to the procedure you advised. 

    I allocated the code in main.c as following;

    int main(int argc, char *argv[])

    {
          float volatile f32temp = 0.0f;

          float adxl355Scale = 0.0f;

          /* Initialize SPI1 */

          SPI_Init();

          /* Initialize UART */

          UART_Init(B9600, COMLCR_WLS_8BITS);

          /* Clock Configuration */

          status = XOSCCfg(CLK_XON);

          SetSystemExtClkFreq(__XTAL);

          ClkCfg(CLK_CD0, CLK_LFX, CLKSYSDIV_DIV2EN_DIS, CLK_UCLKCG);


          /* Initialize the System Timer and its interrupt, and starts the System Tick Timer. */

          timer_start(); 

          /* Initialize accelerometer */

          ADXL355_Init();

          SPI_Write(RESET, 0x52, 0x00, SPI_WRITE_ONE_REG);

          :

    Before the step of "ADXL355_Init()", the debug process goes well. 

    However, at the step of "ADXL355_Init()", the execution stops for no reason and the bricking suddenly occurs.

    I also checked whether the "SystemCoreClockUpdate()" is working normally or not in timer_start().

    In "SystemCoreClockUpdate()", the process is switched normally to "case CLKCON0_CLKMUX_LFXTAL:".

    Is there anything to consider to apply the crystal oscillator ? 

    Is ClkSel() required for EVAL-ADXL355-PMDZ ?

    Best regards

  • +1
    •  Analog Employees 
    on May 20, 2021 6:55 AM in reply to Namsan

    Hello,

    Try to do the clock switch before doing anything else, so before the SPI_Init. The reason for this is that the SPI derives the clock for the system clock, and maybe it has to be done after the new clock is settled. UART functions the same way.

    Also be careful about the transmit frequencies of SPI and UART. They only go downward from the system clock so when the system clock is 32k the UART and SPI cannot be more than that.

    Regards,
    Andrei