/*
 * comm_sysconfig.c
 *
 *  Created on: 2023Äê4ÔÂ2ÈÕ
 *      Author: User
 */
#include "comm_sysconfig.h"


void sysconfig(void)

{

    //
    // Step 1. Initialize System Control:
    // PLL, WatchDog, enable Peripheral Clocks
    // This example function is found in the F2837xD_SysCtrl.c file.
    //
   InitSysCtrl();

   //
   // Step 2. Initialize GPIO:
   // This example function is found in the F2837xD_Gpio.c file and
   // illustrates how to set the GPIO to it's default state.
   //
   InitGpio();

   //GPIOMux
   /*
    * SPI gpioMux
    */
   // spi_gpioMux();
   /*
    * SCIb gpioMux
    */
    printf_gpioMux();

}

void INTconfig(void)


{

    //
    // Step 3. Clear all __interrupts and initialize PIE vector table:
    // Disable CPU __interrupts
    //
       DINT;

    //
    // Initialize PIE control registers to their default state.
    // The default state is all PIE __interrupts disabled and flags
    // are cleared.
    // This function is found in the F2837xD_PieCtrl.c file.
    //
       InitPieCtrl();

    //
    // Disable CPU __interrupts and clear all CPU __interrupt flags:
    //
       IER = 0x0000;
       IFR = 0x0000;

    //
    // Initialize the PIE vector table with pointers to the shell Interrupt
    // Service Routines (ISR).
    // This will populate the entire table, even if the __interrupt
    // is not used in this example.  This is useful for debug purposes.
    // The shell ISR routines are found in F2837xD_DefaultIsr.c.
    // This function is found in F2837xD_PieVect.c.
    //
       InitPieVectTable();

}

