2023-02-24 01:47 AM
The code goes to
HAL_I2S_Receive_DMA at __HAL_UNLOCK(hi2s);
and
void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
{
uint32_t tmpisr;
__IO uint32_t count = 0;
uint32_t timeout = SystemCoreClock / 9600;
/* calculate DMA base and stream number */
DMA_Base_Registers *regs = (DMA_Base_Registers *)hdma->StreamBaseAddress;
tmpisr = regs->ISR; => hardfault_handler
Failed to execute MI command:
-data-evaluate-expression "((DMA_Base_Registers *)hdma->StreamBaseAddress)->ISR"
Error message from debugger back end:
Cannot access memory at address 0xf8960000
Failed to execute MI command:
-data-evaluate-expression "((DMA_Base_Registers *)hdma->StreamBaseAddress)->Reserved0"
Error message from debugger back end:
Cannot access memory at address 0xf89c0004
Failed to execute MI command:
-data-evaluate-expression "((DMA_Base_Registers *)hdma->StreamBaseAddress)->IFCR"
Error message from debugger back end:
Cannot access memory at address 0xf8870008
What did I miss here?
2023-02-24 08:20 AM
Hi @jess ,
looks like you made some error handling the pointers. Maybe dereferencing? Or maybe the hdma structure is not initialized? But there's really nothing at that memory address, so the error code will show until you fix your code.
BR,
J
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-04-28 12:13 AM
This can happen with buffer overflow which corrupts DMA_HandleTypeDef