//---------------------------------------------------------- // Init the platform as if on cold reset //---------------------------------------------------------- void initPlatform(void) { // no clock calibration for launchpad (?) // initialize main timers in system mode (no timer B available) msp430InitTimerA(); #if USE_USER_BUTTON userButtonInit(); #endif }
//---------------------------------------------------------- // Init the platform as if on cold reset //---------------------------------------------------------- void initPlatform(void) { msp430Init(); #if USE_SERIAL_NUMBER serialNumberInit(); #endif #if USE_USER_BUTTON userButtonInit(); #endif #if !USE_EXT_FLASH // make sure the flash chip is in low power mode mdelay(10); m25pxx_init_low_power(); hw_spiBusOff(M25PXX_SPI_ID); #endif }
int main(void) { spiInit(); SystemCoreClockUpdate(); spiInit(); serialDebugInit(); userButtonInit(); userLedsInit(); printf("STM32F429 TFT - program v1.0 - rozpoczecie programu\n"); //ledRedOn(); //ledGreenOff(); /** * IMPORTANT NOTE! * The symbol VECT_TAB_SRAM * * needs to be defined when building the project * if code has been located to RAM and interrupts are used. * Otherwise the interrupt table located in flash will be used. * See also the <system_*.c> file and how the SystemInit() function updates * SCB->VTOR register. * E.g. SCB->VTOR = 0x20000000; */ //STM_EVAL_LEDInit(LED3); //STM_EVAL_LEDInit(LED4); // STM_EVAL_LEDOn(LED3); // STM_EVAL_LEDOn(LED4); /* Infinite loop */ while (1) { printf("1\n"); _delay_ms(200); printf("2\n"); _delay_ms(200); // while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET); // USART1->DR = 'p'; //printf(" p \n"); } }