AnsweredAssumed Answered

HardFault Handler occurs with the memcpy function

Question asked by gaojian.xu on Apr 11, 2013
Latest reply on Apr 11, 2013 by Clive One
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!

Outcomes