资源简介

实现了ARM上的USART通过PDC方式进行收发,很快掌握USART和基本PDC的使用方法

资源截图

代码片段和文件信息

//*----------------------------------------------------------------------------
//*         ATMEL Microcontroller Software Support  -  ROUSSET  -
//*----------------------------------------------------------------------------
//* The software is delivered “AS IS“ without warranty or condition of any
//* kind either express implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name           : Cstartup_SAM7.c
//* object              : Low level initializations written in C for Tools
//* Creation            : 12/Jun/04
//* 1.2   28/Feb/05 JPP : LIB change AT91C_WDTC_WDDIS & PLL
//* 1.3   21/Mar/05 JPP : Change PLL Wait time
//* 1.4   21/Aug/05 JPP : Change MC_FMR Setting
//* 1.5   29/Aug/05 JPP : Change PLL error
//* 1.6   13/oct/05 JPP : Change comment
//*----------------------------------------------------------------------------

// Include the board file description
#include “Board.h“

// The following functions must be write in ARM mode this function called directly
// by exception vector
extern void AT91F_Spurious_handler(void);
extern void AT91F_Default_IRQ_handler(void);
extern void AT91F_Default_FIQ_handler(void);

//*----------------------------------------------------------------------------
//* \fn    AT91F_LowLevelInit
//* \brief This function performs very low level HW initialization
//*        this function can be use a Stack depending the compilation
//*        optimization mode
//*----------------------------------------------------------------------------
void AT91F_LowLevelInit( void)
{
 int            i;
 AT91PS_PMC     pPMC = AT91C_base_PMC;
    //* Set Flash Waite sate
//  Single Cycle Access at Up to 30 MHz or 40
    AT91C_base_MC->MC_FMR = AT91C_MC_FWS_1FWS ;

    //* Watchdog Disable
        AT91C_base_WDTC->WDTC_WDMR= AT91C_WDTC_WDDIS;

//* Set MCK at 48 054 850
    // 1 Enabling the Main Oscillator:
        // SCK = 1/32768 = 30.51 uSecond
     // Start up time = 8 * 6 / SCK = 56 * 30.51 = 146484375 ms
       pPMC->PMC_MOR = (( AT91C_CKGR_OSCOUNT & (0x06 <<8) | AT91C_CKGR_MOSCEN ));
        // Wait the startup time
        while(!(pPMC->PMC_SR & AT91C_PMC_MOSCS));
// 2 Checking the Main Oscillator Frequency (Optional)
// 3 Setting PLL and divider:
// - div by 14 Fin = 1.3165 =(18432 / 14)
// - Mul 72+1: Fout = 96.1097 =(36864 *73)
// for 96 MHz the erroe is 0.11%
// Field out NOT USED = 0
// PLLCOUNT pll startup time estimate at : 0.844 ms
// PLLCOUNT 28 = 0.000844 /(1/32768)
       pPMC->PMC_PLLR = ((AT91C_CKGR_DIV & 14 ) |
                         (AT91C_CKGR_PLLCOUNT & (28<<8)) |
                         (AT91C_CKGR_MUL & (72<<16)));


        // Wait the startup ti

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     145323  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\AT91SAM7S64.h

     文件        346  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\AT91SAM7S64.html

     文件     121570  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\AT91SAM7S64.inc

     文件     123952  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\AT91SAM7S64.rdf

     文件     109068  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\AT91SAM7S64.tcl

     文件     129356  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\AT91SAM7S64_inc.h

     文件     103944  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\ioat91sam7s64.ddf

     文件     248856  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\ioat91sam7s64.h

     文件     146542  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\lib_AT91SAM7S64.h

     文件      61822  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_ADC.html

     文件      23096  2005-05-10 14:59  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_AIC.html

     文件       9331  2005-02-09 16:49  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_CKGR.html

     文件      43729  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_DBGU.html

     文件     404425  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_h.html

     文件        394  2004-07-16 07:54  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_idx.html

     文件       6456  2005-08-26 15:00  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_list.html

     文件      29350  2005-05-20 16:17  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_MC.html

     文件      21154  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_PDC.html

     文件      29875  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_PIO.html

     文件       9624  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_PITC.html

     文件      47325  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_PMC.html

     文件      23548  2005-05-10 14:59  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_PWMC.html

     文件      20770  2005-03-08 16:04  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_PWMC_CH.html

     文件      12251  2005-08-26 15:00  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_RSTC.html

     文件      10196  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_RTTC.html

     文件     181572  2005-08-30 16:09  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_search.html

     文件      50345  2005-08-26 15:00  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_SPI.html

     文件      62461  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_SSC.html

     文件      25941  2005-02-03 16:12  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_SYS.html

     文件      66332  2005-02-18 14:59  AT91SAM7S64-BasicPDC-IAR4_30A-1_21\include\HTML\AT91SAM7S64_TC.html

............此处省略150个文件信息

评论

共有 条评论