2018-05-25 11:43 PM
Hello.,..,
We were working with STM32F765BIT MCU SAI interface to capture 4 channel audio data and it was working fine , But now we are upgrading to STM32H743BIT MCU(both are same package) and made same configuration ,It seems the SAI interface works fine with Interrupt mode , But when I tried with DMA to receive audio data its getting DMA error .
I used STM cubeMX to generate driver file and used the same procedure as I used for earlier one. I have been stuck in this issue for a long while , and also raising this issue on community but not getting any response.,
If ST people can spare some time to resolve this issue it would be appreciated lot.
Thank you.,
#stm32 Note: this post was migrated and contained many threaded conversations, some content may be missing.2018-05-26 04:11 AM
This is primarily a user to user forum, suggest you link to existing threads if you refer to them, provide a complete ZIPed project minimally illustrating the failure, that compiles, and a dump of the related registers and error statuses.
This thread?
https://community.st.com/0D50X00009XkXYlSAN
The H7 is more complex than any other STM32 part, DMA has new routing options, there may be issues with specific memory locations. DMA 'Error' conditions typically revolve about using an address that is not supported. Check the bus matrix diagrams for memory/bus connectivity, and the DMA channel matrix. Try different SRAM blocks.
The data provided so far is NOT sufficient to get involved in diagnostic work. There only a handful of users here using H7 parts. People aren't going to spend hours on your problems, including ST staff, your goal would be to provide sufficient material that 5-10 minute of build/review might provide definitive answers. The number of people wanting to get involved in CubeMX code is even smaller.
Review, test and evaluate examples provided by ST, determine if these work or replicate the failure you observe
STM32Cube_FW_H7_V1.2.0\Projects\STM32H743I_EVAL\Examples\SAI
2018-05-29 08:58 AM
Hello
karthikshivanna.94
,The problem that you have,it may
be due to an error in the DMA configuration. The configuration of
STM32F7 is not the same as inSTM32H7.
You should check the
DMA configuration,DMA stream notion and channel which are different. Also the DMA request should be enabled for STM32H7.
For STM32H7, the adress
@0x20000000 DTCM is not accessible by the DMA.
You may refer to the reference manual to check the right adress on section ''Embedded SRAM
''.I suggest that you have a look to the working SAI example within STM32CubeH7 firmware package, it may help you:
STM32Cube_FW_H7_V1.2.0\Projects\STM32H743I_EVAL\Examples\SAI
You find there a readme.txt file describing how to use the example and you should
follow the instructions and notes.
Then, you may update the example orre-use it according to your needsandget inspiredtocheck the DMA configuration.
Hope this bring you some help.
With Regards
,
Imen
2018-05-30 02:30 AM
Hai Imen D.,.,
Yes it is ri8 , the problem resolved by changing the RAM address area, Now its working fine, Also I found some bugs in Cube MX while generating code for ethernet interface,
Bug 1: All ethernet GPIO pins mode should be set to High speed(In GPIO configuration) , but by default it set as low speed mode.
Bug 2: By default in cube 4 TX & RX descriptors are taken , But it works only when I changed to 2 TX & RX descriptors.
Thank you.,.,
2018-05-30 03:24 AM
Hi
karthikshivanna.94
,Well, I'm glad that you solved your problem.
Can you please create a new discussion describing the CubeMXbugs that you have foundwith more details about the version used andioc file attached, then I will raise your issuesinternallyto CubeMX teeam for more check.
Best Regards,
Imen
2018-06-03 02:22 AM
Hello.,.,
I am facing some issue with STM32H743BIT MCU Ethernet interface, I am using LWIP stack and cube MX generated project. But the code hangs (going to hard fault handler ) at fallowing line which present in low_level_output(struct netif *netif, struct pbuf *p) function.
/* Clean and Invalidate data cache */
SCB_CleanInvalidateDCache();Can you please suggest what might be the wrong and how to come out from this issue. I have checked by enabling & disabling the DCACHE memory and all but still it is unresolved.
Thank you
2018-06-03 06:41 AM
You might want to use something a bit more selective that doesn't trash the cache/buffers used by the stack
ie consider SCB_InvalidateDCache_by_Addr
() rather thanSCB_InvalidateDCache().
Consider also where the stack is situated, perhaps use DTCM RAM
2018-06-03 06:52 AM
Hello Clive One.,.,
I am bit confused, Can you please give some more brief explanation, This problem occur only when I use LWIP initialization, How could I know the address used by stack. I used Cube MX generated code. Please help me to come out of this issue.
Thank you.,
2018-06-03 07:15 AM
>>How could I know the address used by stack.
Presumably by inspection, debugger should provide insight to what you are using, and the linker script/scatter file, along with attributes for the stack section should control where it is placed.
>>I am bit confused, Can you please give some more brief explanation
Salient documentation
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0646b/ch04s08shtml
Make a more specific determination about the cause of the Hard Fault.
With cache coherency between CPU and DMA/Ethernet try to be narrow and specific about the memory involved rather than invalidate everything.
>>I used Cube MX generated code.
Unfortunately you may still need to understand the processor and memory allocations used for specific buffers, and tuning/settings for specific tool chains. The HAL example code may have more actual testing done on it.
2018-06-03 07:30 AM
Hello Clive.,
Thanks for the suggestion, As per your suggestion I have done fallowing changes, I am now clearing only Tx & Rx descriptor locations only , But still the issue remain unresolved. Can you please confirm whether I am doing an wrong.
// /* Clean and Invalidate data cache */
// SCB_CleanInvalidateDCache(); /* Invalidate data cache for ETH Rx Buffers */ SCB_InvalidateDCache_by_Addr((uint32_t *)Txbuffer, (ETH_TX_DESC_CNT*ETH_MAX_PACKET_SIZE));// /* Clean and Invalidate data cache */
// SCB_CleanInvalidateDCache(); /* Invalidate data cache for ETH Rx Buffers */ SCB_InvalidateDCache_by_Addr((uint32_t *)Rx_Buff, (ETH_RX_DESC_CNT*ETH_MAX_PACKET_SIZE));Thank you.,