打印
[8/16-bit MCU]

powerpc架构MPC5604B单片机ADC例程

[复制链接]
5766|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
Jessicakjdsl|  楼主 | 2016-1-23 21:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
main.c
#include "MPC5604B_M27V.h"
#define  LED        SIU.GPDO[76].B.PDO


uint16_t AD_IN1,AD_IN2;

/* *****************************************************************************
   Function:        void SWT_DisableWatchDog(void)
   Description:     Disable The Software WatchDog Timer (SWT)
   Parameters:      Input:    None
                    Output:   None
   Notes:           To Clear The SWT_CR[SLK] Soft Lock Bit,
                    The Value 0xC520 Followed By 0xD928 Is Written To The WSC Field.
   ***************************************************************************** */
void SWT_DisableWatchDog(void)
{
  SWT.SR.R = 0x0000C520;                // 向SR中写入C520和D928清除CR中的SLK位
  SWT.SR.R = 0x0000D928;               
  SWT.CR.R = 0x8000010A;                // 清除看门狗使能位 (WEN),禁止软件看门狗工作。
}

/* *****************************************************************************
   Function:        void SYSTEM_Init(void)
   Description:     Initialize Following System Peripherals
                    - The Mode Entry (ME)
                    - Clock Generation Module (CGM)
                    - Frequency Modulated Phase Locked Loop (FMPLL)
                    - Clock Monitor Unit (CMU)
                    - Power Control Unit (PCU)
                    - ReSet Generation Module (RGM)
                    - System Status And Configuration Module (SSCM)
   Parameters:      Input:    None
                    Output:   None
   Notes: 系统初始化函数
   ***************************************************************************** */
void SYSTEM_Init(void)
{
//模式配置: 使能DRUN, RUN0, SAFE, RESET模式
  ME.MER.R = 0x0000001D;   

//初始化锁相环,
//外部晶振为8MHz,设置PLL0为64MHz  // 0x05400100: 0000 0101 0100 0000 0000 0001 0000 0000
//设置IDF=2,ODF=4,NDIV=64;
//锁相环输出时钟phi=(clkin*NDIV)/(IDF*ODF)=(8*64)/(2*4)=64MHz
  CGM.FMPLL_CR.R = 0x05400100;

//RUN0配置: 主电压调节器打开,Data Flash处于正常模式。Code Flash处于正常模式。
//使能锁相环,锁相环输出时钟作为系统时钟。
  ME.RUN[0].R   = 0x001F0074;           
  
//外设运行配置0: 外设在所有模式下都工作
  ME.RUNPC[0].R = 0x000000FE;           
  
// ADC: 选择 ME.RUNPC[0] 的配置  
  ME.PCTL[32].R = 0x00;                 

// SIUL: 选择 ME.RUNPC[0] 的配置  
  ME.PCTL[68].R = 0x00;                 

// 设置进入RUN0模式
  ME.MCTL.R = 0x40005AF0;               //写入模式和密钥
  ME.MCTL.R = 0x4000A50F;               //写入模式和反密钥

//等待模式转换完成
  while(ME.GS.B.S_MTRANS) {};           
//验证进入了RUN0模式
  while(ME.GS.B.S_CURRENTMODE != 4) {}  
}


/************************************************************/
/*                       初始化SIU                          */
/************************************************************/
void init_SIU(void)
{

        SIU.PCR[76].R = 0x0220;               // 设置PE[12]为开漏输出,控制D1

        SIU.PCR[20].R = 0x2000;               // 设置PB[4]为ADC0模数转换输入
        SIU.PCR[21].R = 0x2000;               // 设置PB[5]为ADC1模数转换输入

}

/************************************************************/
/*                     初始化ADC转换                        */
/************************************************************/
void ADC_init(void)
{
  ADC.MCR.R        = 0x20000000;        //初始化ADC为扫描模式,时钟为32MHz。
  ADC.NCMR[0].R    = 0x00000003;        //选择转换ADC0和ADC1
  ADC.CTR[0].R     = 0x00008606;        //设置转换时间
  ADC.MCR.B.NSTART = 1;                 //启动AD转换
}

/************************************************************/
/*                         主函数                           */
/************************************************************/
int main(void)
{
        SWT_DisableWatchDog();
        SYSTEM_Init();
        init_SIU();
        ADC_init();       

        for (;;)
        {
            while(ADC.CDR[0].B.VALID != 1) {}         //等待ADC0转换结果有效
            AD_IN1 = (uint16_t)ADC.CDR[0].B.CDATA;    //读取ADC0的转换结果
            while(ADC.CDR[1].B.VALID != 1) {}         //等待ADC0转换结果有效
            AD_IN2 = (uint16_t)ADC.CDR[1].B.CDATA;    //读取ADC0的转换结果
                if(AD_IN1>AD_IN2)
                        LED=0;      //点亮指示灯
                else
                        LED=1;           //熄灭指示灯
        }
}




相关帖子

沙发
Jessicakjdsl|  楼主 | 2016-1-23 21:03 | 只看该作者
#include "Exceptions.h"    /* IVPR and default exception handlers setup */
#include "INTCInterrupts.h" /* INTC Interrupts Requests configuration */
#include "MPC5604B_M27V_HWInit.h"

#pragma section code_type ".init"

#define INIT_DERIVATIVE_INTERNAL_SETUP 1
#define INIT_EXTERNAL_BUS_INTERFACE_SETUP 0

#ifndef INIT_DERIVATIVE_INTERNAL_SETUP
#pragma error INIT_DERIVATIVE_INTERNAL_SETUP should be defined !
#endif

#ifndef INIT_EXTERNAL_BUS_INTERFACE_SETUP
#pragma error INIT_EXTERNAL_BUS_INTERFACE_SETUP should be defined !
#endif

#ifdef __cplusplus
extern "C" {
#endif

extern __asm void __start();
__asm void usr_init();
/*lint -esym(752,__start) */

#ifdef __cplusplus
}
#endif

/*****************************************************************/
/* usr_init():                                                   */
/*   Define here the needed hardware initializations at startup  */

__asm void usr_init()
{
    /* Add needed hardware initializations in this function */
    nofralloc

    mflr     r30                         /* Save off return address in NV reg */

#if INIT_DERIVATIVE_INTERNAL_SETUP==1
    bl      INIT_Derivative              /* Derivative specific hardware initializations */
#endif
#if INIT_EXTERNAL_BUS_INTERFACE_SETUP==1
    bl      INIT_ExternalBusAndMemory    /* Set up access to external memory (inc. chip select and MMU) */
#endif
    bl      EXCEP_InitExceptionHandlers   /* Set up Default Exception handling */
    bl      INTC_InitINTCInterrupts       /* Set up INTC Interrupts Requests handling */

    mtlr    r30                          /* Get saved return address */

    blr
}

#ifdef __cplusplus
extern "C" {
#endif

/**************************************************************/
/* RCHW and Reset Vector setup:                               */
/*   The chip is by default setup to boot from internal Flash */
/*   and the watchdog is disabled.                            */

typedef void (*resetfuncptr)(void);

#pragma push /* Save the current state */
#pragma section const_type sconst_type ".__bam_bootarea"
extern const unsigned long bam_rchw;
extern const resetfuncptr bam_resetvector;

/* RCHW_VALUE Flags */
#define RCHW_WTE 0x0400L        /* Enable Watchdog */
#define RCHW_VLE 0x0100L        /* Enable Variable Length Encoding*/
#define RCHW_PS0_32BITS 0x0000L /* Boot from External Bus CS0, 32-bit CS0 port size. */
#define RCHW_PS0_16BITS 0x0200L /* Boot from External Bus CS0, 16-bit CS0 port size. */
#define RCHW_BOOTIDENTIFIER 0x005AL

/* Used RCHW value: boot from internal flash, watchdog disabled */
#if VLE_IS_ON == 1
#define RCHW_VALUE RCHW_BOOTIDENTIFIER|RCHW_PS0_32BITS|RCHW_VLE
#else
#define RCHW_VALUE RCHW_BOOTIDENTIFIER|RCHW_PS0_32BITS
#endif

const unsigned long bam_rchw = ((RCHW_VALUE)<<16) + (RCHW_VALUE);
const resetfuncptr bam_resetvector = __start;

#pragma pop

#ifdef __cplusplus
}
#endif

使用特权

评论回复
板凳
Jessicakjdsl|  楼主 | 2016-1-23 21:04 | 只看该作者

/*
*
* FILE : MPC5604B_M27V_HWInit.c
*
* DESCRIPTION:
*  This file contains all MPC5604B_M27V derivative needed initializations,
*  and all initializations for the MPC5604B_M27V boards which are supported.
*  This includes setting up the External Bus Interface to allow access
*  to memory on the external bus, and ensuring there is a valid entry in
*  the MMU for the external memory access.
*/

/*---------------------------------------------------------------------------*/
/* Includes                                                                  */
/*---------------------------------------------------------------------------*/

#include "MPC5604B_M27V.h"      /* MPC56xx platform development header            */
#include "MPC5604B_M27V_HWInit.h"

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************/
/* MPC5604B_M27V derivative specific hardware initialization */
/*******************************************************/

/* Symbol L2SRAM_LOCATION is defined in the application linker command
   file (.lcf)  It is defined to the start of the internal SRAM in the
   MPC5604B_M27V.
*/
/*lint -esym(752, L2SRAM_LOCATION) */
extern long L2SRAM_LOCATION;  


__asm void INIT_Derivative(void)
{
nofralloc

    /* MPC5604B_M27V SRAM initialization code                              */
    lis r11,L2SRAM_LOCATION[url=home.php?mod=space&uid=945]@h[/url]       /* Base of SRAM, 64-bit word aligned */
    ori r11,r11,L2SRAM_LOCATION@l

    li r12,256        /* Loops to cover 32K SRAM; 32k/4 bytes/32 GPRs = 384 */
    mtctr r12

    init_l2sram_loop:
        stmw r0,0(r11)        /* Write 32 GPRs to SRAM                     */
        addi r11,r11,128      /* Inc the ram ptr; 32 GPRs * 4 bytes = 128B */
        bdnz init_l2sram_loop /* Loop for 32k of SRAM                      */

    blr
}

/*******************************************************/
/* MPC5604B_M27V boards specific hardware initializations    */
/*******************************************************/

/** This macro allows to use C defined address with the inline assembler */
#define MAKE_HLI_COMPATIBLE(hli_name, c_expr) enum { hli_name=/*lint -e30*/((int)(c_expr)) };

/*----------------------------------------------------------------------------*/
/* Function declarations                                                      */
/*----------------------------------------------------------------------------*/

/* Initialize a set of contiguous PCRs */
__asm void InitPCRs(void);

/* Initialize the SIU External Bus Interface */
__asm void __initSIUExtBusInterface(void);

/* Initialize the used EBI Chip Selects */
__asm void __initEBIChipSelects(void);

/* Write one MMU Table Entry */
__asm void WriteMMUTableEntry( void );

/* Initialize the needed MMU Table entries */
__asm void __initMMUExternalMemory(void);

/*----------------------------------------------------------------------------*/
/* Function implementations                                                   */
/*----------------------------------------------------------------------------*/

__asm void INIT_ExternalBusAndMemory(void)
{
nofralloc

    mflr     r28
   
    /* Initialize the SIU External Bus Interface */
    bl __initSIUExtBusInterface
    /* Initialize the used EBI Chip Selects */
    bl __initEBIChipSelects
    /* Initialize the needed MMU Table entries */
    bl __initMMUExternalMemory
   
    mtlr     r28
   
    blr
}

/*----------------------------------------------------------------------------*/
/* External Memory Locations from lcf file                                    */
/*----------------------------------------------------------------------------*/

#if INIT_USED_BOARD==MPC5604B_M27VDEMO_AXM_0321
/* Symbol AXM_0321_EXTERNAL_RAM is defined in the application linker command file (.lcf)
   It is defined to the start of the external memory on the MPC5604B_M27VDEMO_AXM-0321 board
*/
extern unsigned long AXM_0321_EXTERNAL_RAM[];
#endif

/*----------------------------------------------------------------------------*/
/* SIU External Bus Interface                                                 */
/*----------------------------------------------------------------------------*/

/* Initialize a set of contiguous PCRs:               */
/* r3: the firts PCR to initialize                    */
/* r4: the value to write in the PCRs                 */
/* r5: the number of PCRs to initialize               */
__asm void InitPCRs(void)
{
nofralloc

    mtctr r5                   /* intialize ctr with the number of PCRs to initialize */
    pcr_init_loop:
        sth r4,0(r3)           /* Write r4 to current PCR address */
        addi r3,r3, 2          /* Inc the memory ptr by 2 to point to the next PCR */
        bdnz pcr_init_loop     /* Loop for ctr PCRs */

    blr
}

/* Initialize the SIU External Bus Interface */
__asm void __initSIUExtBusInterface(void)
{
MAKE_HLI_COMPATIBLE(SIU_PCR0,&SIU.PCR[0].R)
MAKE_HLI_COMPATIBLE(SIU_PCR4,&SIU.PCR[4].R)
MAKE_HLI_COMPATIBLE(SIU_PCR28,&SIU.PCR[28].R)
MAKE_HLI_COMPATIBLE(SIU_PCR62,&SIU.PCR[62].R)
MAKE_HLI_COMPATIBLE(SIU_PCR64,&SIU.PCR[64].R)
MAKE_HLI_COMPATIBLE(SIU_PCR68,&SIU.PCR[68].R)
nofralloc

    mflr r27

    /*  This initializes the MPC5604B_M27V external bus
        Set up the pins
        Address bus PCR 4 - 27
        Configure address bus pins
    */
    lis r3,SIU_PCR4@h          /* First PCR Address bus is PCR 4 */
    ori r3,r3,SIU_PCR4@l
    li r5,24                   /* Loop counter to get all address bus PCR (4 to 27) -> 24 PCRs  */
    li r4, 0x0440              /* PCRs initialization value */
    bl InitPCRs

    /*  Data bus PCR 28-59
        Configure data bus pins
    */
    lis r3,SIU_PCR28@h         /* First PCR for data bus is PCR 28 */
    ori r3,r3,SIU_PCR28@l
    li r5,32                   /* Loop counter to get all data bus PCR (28-59) -> 32 PCRs  */
    li r4, 0x0440              /* PCRs initialization value */
    bl InitPCRs

    /*  Configure minimum bus control pins
        RD/WR  & BDIP PCR 62/63
    */
    lis r3,SIU_PCR62@h         /* First PCR for is PCR 62 */
    ori r3,r3,SIU_PCR62@l
    li r5,2                    /* Loop counter to get all PCR (62-63) -> 2 PCRs  */
    li r4, 0x0440              /* PCRs initialization value */
    bl InitPCRs

    /*  WE[0-4] PCR 64-67
    */
    lis r3,SIU_PCR64@h         /* First PCR for is PCR 64 */
    ori r3,r3,SIU_PCR64@l
    li r5,4                    /* Loop counter to get all PCR (64-67) -> 4 PCRs  */
    li r4, 0x0443              /* PCRs initialization value */
    bl InitPCRs

    /*  OE & TS
    */
    lis r3,SIU_PCR68@h         /* First PCR for is PCR 68 */
    ori r3,r3,SIU_PCR68@l
    li r5,2                    /* Loop counter to get all PCR (68-69) -> 2 PCRs  */
    li r4, 0x0443              /* PCRs initialization value */
    bl InitPCRs
   
    /*  Configure the chip selects
        CS[0-3]
    */
    lis r3,SIU_PCR0@h          /* First PCR for is PCR 0 */
    ori r3,r3,SIU_PCR0@l
    li r5,4                    /* Loop counter to get all PCR (0-3) -> 4 PCRs  */
    li r4, 0x0443              /* PCRs initialization value */
    bl InitPCRs
   
    mtlr r27
   
    blr
}

/*----------------------------------------------------------------------------*/
/* EBI Chip Selects                                                           */
/*----------------------------------------------------------------------------*/

/* Initialize the used EBI Chip Selects */
__asm void __initEBIChipSelects(void)
{
#if INIT_USED_BOARD==MPC5604B_M27VDEMO_AXM_0321
MAKE_HLI_COMPATIBLE(EBBI_CS0_BR,&EBI.CS[0].BR.R)
MAKE_HLI_COMPATIBLE(EBBI_CS0_OR,&EBI.CS[0].OR.R)
#endif
nofralloc

#if INIT_USED_BOARD==MPC5604B_M27VDEMO_AXM_0321
    /*  CY7C1338 512K External SRAM - 4 beat burst, 0 wait
        Set up Memory Controller CS0 [url=home.php?mod=space&uid=72445]@[/url] AXM_0321_EXTERNAL_RAM
    */
    /*  EBI.CS[0].BR.R = (unsigned long)AXM_0321_EXTERNAL_RAM | 0x41UL;
    */
    lis      r3,AXM_0321_EXTERNAL_RAM@h
    addi     r0,r3,AXM_0321_EXTERNAL_RAM@l
    ori      r0,r0,0x0041   
    lis      r3,EBBI_CS0_BR@h
    ori      r3,r3,EBBI_CS0_BR@l
    stw      r0,0(r3)
    /*  EBI.CS[0].OR.R = 0xfff80000;
    */
    lis      r0,0xfff8
    lis      r3,EBBI_CS0_OR@h
    ori      r3,r3,EBBI_CS0_OR@l
    stw      r0,0(r3)   
#endif

    blr
}

/*----------------------------------------------------------------------------*/
/* Writing to MMU Table Entries                                               */
/*----------------------------------------------------------------------------*/

/* Write one MMU Table Entry:               */
/* r3, r4, r5 and r6 must hold              */
/* the values of MAS0, MAS1, MAS2 and MAS3  */
__asm void WriteMMUTableEntry( void )
{
nofralloc

    /* Write MMU Assist Register 0 (MAS0); SPR 624 */
    mtspr   624, r3
    /* Write MMU Assist Register 1 (MAS1); SPR 625 */
    mtspr   625, r4
    /* Write MMU Assist Register 2 (MAS2); SPR 626 */
    mtspr   626, r5
    /* Write MMU Assist Register 3 (MAS3); SPR 627 */
    mtspr   627, r6
    /* Write the table entry */
    tlbwe

    blr
}

/* Initialize the needed MMU Table entries */
__asm void __initMMUExternalMemory(void)
{
#if INIT_USED_BOARD==MPC5604B_M27VDEMO_AXM_0321
/* Set up MMU for External Memory
   Base address = 0x2000_0000
   16 MByte Memory Space, Not Guarded, Cachable, All Access
*/
MAKE_HLI_COMPATIBLE(AXM_0321_EXT_RAM_MAS0_VALUE,MAS0_VALUE(2))
/* 16 MB memory space, valid, protected, global which matches with all process IDs */
MAKE_HLI_COMPATIBLE(AXM_0321_EXT_RAM_MAS1_VALUE,MAS1_VALUE(V_VALID, IPROT_PROTECTED, TID_GLOBAL, 0, TSIZE_16MB))
MAKE_HLI_COMPATIBLE(AXM_0321_EXT_RAM_MAS2_FLAGS,MAS2_FLAGS(SHARED_CACHE_STATE_NOT_USED, WRITE_BACK, CACHEABLE, MEM_COHERENCE_NREQ, NOT_GUARDED, BIG_ENDIAN ))
MAKE_HLI_COMPATIBLE(AXM_0321_EXT_RAM_MAS3_FLAGS,MAS3_FLAGS(READ_WRITE_EXECUTE))
#endif
nofralloc

     mflr     r27

#if INIT_USED_BOARD==MPC5604B_M27VDEMO_AXM_0321
     /* load r3 with MAS0 value */
     lis r3,AXM_0321_EXT_RAM_MAS0_VALUE@h
     ori r3,r3,AXM_0321_EXT_RAM_MAS0_VALUE@l
     
     /* load r4 with MAS1 value */
     lis r4,AXM_0321_EXT_RAM_MAS1_VALUE@h
     ori r4,r4,AXM_0321_EXT_RAM_MAS1_VALUE@l
     
     /* load r5 with the external RAM address from the lcf file */      
     lis r5,AXM_0321_EXTERNAL_RAM@h
     ori r5,r5,AXM_0321_EXTERNAL_RAM@l
     
     /* mask with 0xfffff000 */
     clrrwi   r5,r5,12
     
     /* copy the masked external ram address to r6 also */
     mr r6,r5
     
     /* end MAS2 setup in r3 */
     ori r5,r5,AXM_0321_EXT_RAM_MAS2_FLAGS@l
     
     /* end MAS3 setup in r4 */
     ori r6,r6,AXM_0321_EXT_RAM_MAS3_FLAGS@l
     
     /* write the MMU entry defined through r3, r4, r5 and r6 */
     bl WriteMMUTableEntry
#endif

     mtlr r27

     blr
}

#ifdef __cplusplus
}
#endif

使用特权

评论回复
地板
Jessicakjdsl|  楼主 | 2016-1-23 21:05 | 只看该作者
#include "Exceptions.h"    /* IVPR and default exception handlers setup */
#include "INTCInterrupts.h" /* INTC Interrupts Requests configuration */
#include "MPC5604B_M27V_HWInit.h"

#pragma section code_type ".init"

#define INIT_DERIVATIVE_INTERNAL_SETUP 0
#define INIT_EXTERNAL_BUS_INTERFACE_SETUP 0

#ifndef INIT_DERIVATIVE_INTERNAL_SETUP
#pragma error INIT_DERIVATIVE_INTERNAL_SETUP should be defined !
#endif

#ifndef INIT_EXTERNAL_BUS_INTERFACE_SETUP
#pragma error INIT_EXTERNAL_BUS_INTERFACE_SETUP should be defined !
#endif

#ifdef __cplusplus
extern "C" {
#endif

extern __asm void __start();
__asm void usr_init();
/*lint -esym(752,__start) */

#ifdef __cplusplus
}
#endif

/*****************************************************************/
/* usr_init():                                                   */
/*   Define here the needed hardware initializations at startup  */

__asm void usr_init()
{
    /* Add needed hardware initializations in this function */

    nofralloc

    mflr     r30                         /* Save off return address in NV reg */

#if INIT_DERIVATIVE_INTERNAL_SETUP==1
    bl      INIT_Derivative              /* Derivative specific hardware initializations */
#endif
#if INIT_EXTERNAL_BUS_INTERFACE_SETUP==1
    bl      INIT_ExternalBusAndMemory    /* Set up access to external memory (inc. chip select and MMU) */
#endif
    bl      EXCEP_InitExceptionHandlers   /* Set up Default Exception handling */
    bl      INTC_InitINTCInterrupts       /* Set up INTC Interrupts Requests handling */

    mtlr    r30                          /* Get saved return address */
   
    blr
}

使用特权

评论回复
5
Jessicakjdsl|  楼主 | 2016-1-23 21:08 | 只看该作者
/*
   File: ivor_branch_table_p1.c - for use with MPC560x only
   Description:  Branch table for 16 e200z0h core interrupts
   Copyright Freescale 2008.  All Rights Reserved
   Rev 1.0 Jul  6 2007 S.M. - Initial version
   Rev 1.1 May 13 2008 D.F. - Adapted 551x version for e200z0h processors
*/

#pragma push

#define SIXTEEN_BYTES 16

#ifdef __cplusplus
extern "C" {
#endif

/* IVOR4 will call this handler */
extern void INTC_INTCInterruptHandler(void);

#ifdef __cplusplus
}
#endif

#pragma section code_type ".ivor_branch_table"
#pragma force_active on

#pragma function_align 16  

__declspec(vle_on) asm void ivor_branch_table_p1(void) {
  nofralloc

                                .align SIXTEEN_BYTES      
IVOR0trap:  b        IVOR0trap         // IVOR 0 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR1trap:  b        IVOR1trap         // IVOR 1 interrupt handler
                                               
                                .align SIXTEEN_BYTES      
IVOR2trap:  b        IVOR2trap         // IVOR 2 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR3trap:  b        IVOR3trap         // IVOR 3 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR4trap:  b   INTC_INTCInterruptHandler // External Interrupt

                                .align SIXTEEN_BYTES      
IVOR5trap:  b        IVOR5trap    // IVOR 5 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR6trap:  b        IVOR6trap         // IVOR 6 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR7trap:  b        IVOR7trap         // IVOR 7 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR8trap:  b        IVOR8trap         // IVOR 8 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR9trap:  b        IVOR9trap         // IVOR 9 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR10trap: b   IVOR10trap   // IVOR 10 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR11trap:  b        IVOR11trap         // IVOR 11 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR12trap:  b        IVOR12trap         // IVOR 12 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR13trap:  b        IVOR13trap         // IVOR 13 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR14trap:  b        IVOR14trap         // IVOR 14 interrupt handler

                                .align SIXTEEN_BYTES      
IVOR15trap:  b        IVOR15trap         // IVOR15 interrupt handler

        nop  // fill to 0x100 bytes
        nop
        nop
        
}

#pragma pop

使用特权

评论回复
6
Tennasi| | 2016-1-24 20:14 | 只看该作者
这个adc的采样率最高能达到多少啊

使用特权

评论回复
7
hao507| | 2016-4-13 13:11 | 只看该作者
谢谢楼主分享,有没有其他的例程分享下阿~~

使用特权

评论回复
8
linwx2010| | 2016-8-15 19:19 | 只看该作者
谢谢楼主分享

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

17

主题

116

帖子

1

粉丝