Question
HardFault Handler occurs with the memcpy function
Posted on April 11, 2013 at 10:52
void DMA2_Stream2_Rx(void)
{ USART_ITConfig(USART1,USART_IT_RXNE,ENABLE); USART_ITConfig(USART1,USART_IT_ORE_RX,ENABLE); USART_DMACmd(USART1,USART_DMAReq_Rx,DISABLE); memcpy(&mbdCurRxDNode->c->rxBuf[1], &stm32f4_mbus_drv_rx_buf[1],7); STM32F4_ENDRX_RxInt(); } This is the DMA interrupter function,when the program excutes memcpy function,the HardFault Hander occurs. The destination buffer and the source buffer are global!