/*
 *  ======== ti_edgeai_config.c ========
 *
 *  DO NOT EDIT - This file is generated by the SysConfig tool.
 */

#include <stdint.h>

#include "ti_edgeai_config.h"

/*
 *  =============================== TINIE CDE ===============================
 */

void m33_cde_init(void) {
    // Common Configurations is required to enable coproc 0 for CDE instructions
    // to be used
    // SCB->CPACR = SCB->CPACR | 0x3;
    __asm volatile (
        "MOVW r1, #0xED88\n\t"
        "MOVT r1, #0xE000\n\t"
        "LDR  r2, [r1, #0x0]\n\t"
        "MOVW r3, #0xFFFF\n\t"
        "MOVT r3, #0x0000\n\t"
        "ORR  r2, r2, r3\n\t"
        "STR  r2, [r1, #0x0]\n\t"
        "DSB \n\t"
        "ISB \n\t"
        : : :"r1","r2","r3");
}

// Declaration of global variable for sampling Frequency to be read by the DAP
uint32_t samplingfreq;

#include <ti/drivers/Board.h>

void Board_initHook(void)
{
    m33_cde_init();
}


/*
 *  =============================== DAP ===============================
 */
const uint32_t dapBaudRate = 115200;
