RCC->AHBENR|=RCC_AHBENR_GPIOAEN|RCC_AHBENR_GPIOBEN;
RCC->APB1ENR|=RCC_APB1ENR_SPI2EN|RCC_APB1ENR_TIM2EN|RCC_APB1ENR_DACEN;//enabe SPI2 and TIME2 clock and DAC 0x01;//|(1<<18));
GPIOB->MODER|=0xaa000000; //Pb12 13,14,15 SPI2 comm
GPIOB->MODER|=0x00000a80; //PB3,Pb4,Pb5 Af
while(1)
{
Spi2Send(0xa5);
DelayMs(10);
}
}