📄 initflash.c
字号:
#include "system.h"
/********************************************************************************/
/***** InitFlash() *****/
/***** Needed to Selected the ExtenderPPI clock on te BF53x-EZkit *****/
/********************************************************************************/
void InitFlash(void)
{ short temp;
// Initalize EBIU control registers
*pEBIU_AMBCTL0 = 0x78B078B0;
*pEBIU_AMBCTL1 = 0x78B078B0;
asm("ssync;");
// *pPPI_COUNT = Number_of_DAC_channels * Number_of_Samples -1; //don't know if relevant
*pEBIU_AMGCTL |= 0x000F;
asm("ssync;");
/* temp = *((short*)(FLASHA_CSIO+PORTA_DATA_DIR));
printf("%d\n", temp);
temp = *((short*)(FLASHA_CSIO+PORTA_DATA_OUT));
printf("%d\n", temp);
*/
*((short*)(FLASHA_CSIO+PORTA_DATA_DIR)) |= 1<< PPI_EXTENDER_CLK_BIT; // set direction to output
*((short*)(FLASHA_CSIO+PORTA_DATA_OUT)) |= 1<< PPI_EXTENDER_CLK_BIT; // set Flag PA5 high to select external PPI clock
/*
temp = *((short*)(FLASHA_CSIO+PORTA_DATA_DIR));
printf("%d\n", temp);
temp = *((short*)(FLASHA_CSIO+PORTA_DATA_OUT));
printf("%d\n", temp);
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -