Open hobby-pub opened 4 months ago
Hi @hobby-pub,
Than you for this contribution. We will process it soon enough hopefully. By the way, thank you very much for the well formatted commit message.
With regards,
Hello @hobby-pub,
Thank you for your report. We have tried to reproduce the problem you described, without success. Could you please share the entire project you used to reproduce the problem to allow for a better analysis.
Best regards,
Hello @TOUNSTM ,
Unfortunately, I cannot share the commercial project. However, I can send few lines of the related code. Please, let me know where to upload the code example.
Kindly regards,
Hello @hobby-pub,
To attach a file to your P-R, please drag-and-drop it into the comment box or you can click on the bar at the bottom of the comment box to add it from your computer and then wait for the upload process to finish.
With regards,
Hello @TOUNSTM,
Attached the simple test example. Please note, that a lot of initializations are missing.
ST Internal Reference: 177976
Hello @hobby-pub,
Upon further investigation, our development team have encountered a behavior that mirrors the issue described. It appears that during the second invocation of FilterStart, the DMAOut handle remains in a HAL_DMA_STATE_BUSY state. This is the underlying cause of the DMA error, as DMAOut must be in a HAL_DMA_STATE_READY state to initiate properly. I need further clarification from you for a better analysis:
There are two possible explanations for the HAL_DMA_BUSY state:
However, It's also important to note that there is a missing step in the driver to halt the DMA in/out processes.
Thank you for your contribution. With regards,
Hello, @TOUNSTM,
Please, see my answers below.
Can you confirm whether you have observed the same state when the DMA error occurs (DMAOut State == HAL_DMA_STATE_BUSY)? Yes, as far as I remember.
Is Stopping the filter before the end of calculus is an expected/authorized behavior by the program ? Yes, the program stops filter asynchronously regardless of the calculation state, and this is by design.
There are two more notes:
Best regards,
Opened Issue HAL_FMAC_FilterStop does not terminate DMA transfer
Describe the bug A wrong behavior of subsequent HAL_FMAC_FilterStart() -> HAL_FMAC_FilterStop() -> HAL_FMAC_FilterStart().
How To Reproduce
Additional context Follow the issue debugging, DMA transfer starts from within HAL_FMAC_FilterStart(). However, complementary DMA stop is missing in HAL_FMAC_FilterStop().