Hi,
I'm getting random DMA failures.
The error message is general. I was wondering what would be the best way to understand what is the root cause.
Any hints or debug strategies anyone can suggest?
Thanks in advance!
DMA failure
Moderators: RoccoMarco, barthess
-
- Posts: 91
- Joined: Sat Feb 18, 2017 11:50 am
- Has thanked: 43 times
- Been thanked: 23 times
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: DMA failure
Hi,
This could be caused by DMA trying to access an unmapped memory area or do unaligned accesses. A more remote possibility is bandwidth saturation or the memory bus.
Look at the stack trace and look where the problem is detected, it should be a DMA ISR in a driver.
Giovanni
This could be caused by DMA trying to access an unmapped memory area or do unaligned accesses. A more remote possibility is bandwidth saturation or the memory bus.
Look at the stack trace and look where the problem is detected, it should be a DMA ISR in a driver.
Giovanni
-
- Posts: 91
- Joined: Sat Feb 18, 2017 11:50 am
- Has thanked: 43 times
- Been thanked: 23 times
Re: DMA failure
Following your suggestion I've traced this down to spi_lld_serve_rx_interrupt.
If the error hook is define it goes into that if statement there because the STM32_DMA_ISR_TEIF is set.
A couple of questions:
1) despite the flag being set, I don't actually see any error in the SPI tx because this an LCD output and everything is showing as expected
2) this is still occurring randomly
3) I'm only doing tx operations why is that the rx ISR is being called?!
If the error hook is define it goes into that if statement there because the STM32_DMA_ISR_TEIF is set.
A couple of questions:
1) despite the flag being set, I don't actually see any error in the SPI tx because this an LCD output and everything is showing as expected
2) this is still occurring randomly
3) I'm only doing tx operations why is that the rx ISR is being called?!
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: DMA failure
The SPI always transmits and receives at same time even if you don't use the received bytes, the RX DMA interrupt is used to detect the end of the operation. It should not fail, I would inspect into the possible reasons for TEIF to be set on the STM32 RM.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 47 guests