![ST AN3311 Скачать руководство пользователя страница 30](http://html1.mh-extra.com/html/st/an3311/an3311_instruction_1355862030.webp)
In-home display firmware
AN3311
30/58
Doc ID 18209 Rev 1
This function is intended to initialize the hardware peripherals of the STM32 MCU, and the
ZigBee hardware configuration.
Example:
static void prvSetupHardware( void )
{
SystemInit();
/* Enable GPIOA, GPIOB, GPIOC, GPIOD, GPIOE and AFIO clocks */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |
RCC_APB2Periph_GPIOE | RCC_APB2Periph_AFIO, ENABLE );
/* Set the Vector Table base address at 0x08000000 */
NVIC_SetVectorTable( NVIC_VectTab_FLASH, 0x0 );
NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 );
/* Configure HCLK clock as SysTick clock source. */
SysTick_CLKSourceConfig( SysTick_CLKSource_HCLK );
/* Initialize the board */
vBoardInit();
EZSP_Init(); //init OBJ Coordinator
}
6.2.5 vBoardInit
describes the vBoardInit function:
This function is intended to initialize the hardware peripheral of the STM3210C-EVAL board
and the graphic library hardware parameters.
Regarding the file menu.c, it just uses the API function of the graphic library and some
others of the “ZigBee stack for smartplug”, for more information please refer to the AN3128,
rev. 2, application note.
Required preconditions None
Called functions
No API/HAL layer functions;
Table 14.
prvSetupHardware function (continued)
Table 15.
vBoardInit function
Function name
vBoardInit
Function prototype
void vBoardInit (void)
Behavior description
Initialize the hardware peripheral of the STM3210C-EVAL board
Input parameter {x}
None
Output parameter {x}
None
Return value
None
Required preconditions None
Called functions
No API/HAL layer functions;