NVIC causes a hardware fault
I have come to System Workbench after using Coocox. The target board uses a STM32F030C8T6 chip on a custom board. I ported the working code from Coocox to System Workbench as a trial to gain familiarity with the development environment. However I have run into a problem where the code crashes when the NVIC_Init for a USART1 port is envoked.
NVIC_InitTypeDef NVIC_InitStructure;
// Enable SYSCFG clock
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
Does anybody have any idea why this is happening?