Hi,
I'm currently implementing AWE on STM32H743 microcontroller. I've used STM32F769i-Simple project as a reference. The first problem that I encountered was that when using a fresh microcontroller purchased from mouser.com, when trying to connect to AWE server, it produces a CRC error. After contacting both STM and DSPC tech support (4 months of exchanging e-mails), it turned out that some microcontrollers (developments kits such as Nucleos) have an embedded licence, which allows them to talk to AWE server, whereas microcontrollers which are sold on mouser don't, which results in the aforementioned CRC error. So I carried on with using a microcontroller desoldered from a Nucleo board.
I managed to get the tuning interface working and am currently able to upload a layout through AWE Designer software. The next logical step is to get it running in standalone mode. I generated the target files and added the part where it uploads the layout from C array, however now I get error -76, which stands for "Bad packet - CRC error". I've tried reproducing that issue on stm32f769i-disco board, however on stm32f769i-disco everything seems to work fine, no errors. Can you give me any pointers as to what can produce the aforementioned error?
Regards,
Andrej.
8:33pm
Hi Andrej,
I'd like to make sure I'm understanding your process.
You were able to get the STM32H743 from an off-the-shelf Nucleo to connect and tune using AWE Designer without flashing the board, but received the bad packet error?
I've heard of this error coming up due to hardware connections, like going through a USB hub rather than connecting directly to the PC.
6:16am
Hi Kyle,
as I mentioned, I created firmware similar to STM32F769i-Simple, but for STM32H743. The tuning interface is UART, so no USB involved. I flashed it to the Nucleo board, or to be more precise, to one of my boards which has an MCU desoldered from Nucleo-H743ZI2 board and then ran AWE Designer Standard. I'm able to connect to AWE server and upload a layout using AWE designer.
After I got the tuning interface working, I added:
INT32 err = awe_loadAWBfromArray(&g_AWEInstance, Core0_InitCommands, Core0_InitCommands_Len, &nErrOffset );
right after AWEInstanceInit(), in order for it to run in standlalone mode. I then ran the modified firmware in debug mode and could see that awe_loadAWBfromArray returns error -76.
I repeated the same process for stm32f769i-disco board, no errors there. To make sure that it is not the MCU misconfiguration that causes the error on STM32H743, I stripped down STM32F769i-Simple example to the core, leaving only the clock configuration and AWEInstanceInit() followed by awe_loadAWBfromArray(). In case of STM32H743 it still returns error -76, whereas for stm32f769i-disco it returns 0.
1:35pm
Hi Andrej,
This may be due using UART rather than USB. In your installed BSP directory 'C:\DSP Concepts\AWECore ST_EVAL_CortexM7 Release-8.B.5.1_ST_Eval_build66\SampleApps\STM32F769i-Simple\Source' there should be a file called "AWECoreUtils.c" with functions tuningEncodeByteUART() and tuningDecodeByteUART() for encoding/decoding UART Tx/Rx packets. You can also refer to this document: http://download.dspconcepts.com/Audio_Weaver_Core/AWECore_API_Doc/a00066.html#reply-packets
It's difficult to debug these types of applications due to the DIY nature of them, so support is limited on the forum, but I hope the info above is of some assistance for you.
Best,
-Kyle
2:15pm
Thanks for a prompt response,
as I've mentioned at the end of my previous post, I've removed most of the code from the STM32F769i-Simple example (including tuning interface part), leaving only the essentials. If I'm not mistaken, tuning interface is not essential for running AWE in standalone mode. Apart from that, uploading a layout through UART tuning interface works fine, no issues there. The error I described previously is returned in response to awe_loadAWBfromArray() function, which loads layout from C array. The code I have is really simple and basically looks as follows:
Init_Clocks(); AWEInstanceInit(); awe_loadAWBfromArray();
It works fine on STM32F769i, but not on STM32H743. I'm really out of ideas as to what might cause that. Would it be possible for me to get in touch with one of the engineers familiar with the firmware and explain the situation? That would be really helpful.
Regards,
Andrej
2:50pm
Error -76 is a CRC error. When you download a version of AWECore or a BSP example with AWECore included the version of AWECore is locked to a specific platform. If your STM32H743 product is an ST eval board you should be okay. However, if you are working on a board with an STM32H743 processor but the board is not an ST eval board you will get this error
3:34pm
Hi Chris,
thank you for your comment. I'm aware that microcontrollers on ST evaluation kits have an embedded licence for DSPC, while the microcontrollers that can be purchased from places such as Mouser and Digikey don't, see my first post. The microcontrollers that have an embedded licence have letter 'U' at the end of the part number, such as stm32h743zit6U. I got that info from one of ST representatives. The microcontroller that I'm using was desoldered from Nucleo-H743 board. It works fine when uploading a layout through the tuning interface, but fails when uploading the same layout layout from C array using awe_loadAWBfromArray() function. I'm thinking of writing a firmware (similar to STM32F769i-Simple example) for Nucleo-H743 board and posting it here, maybe someone could take a look at it and point me in the right direction.
Regards,
Andrej.
5:35am
Unfortunately you cannot use the AWECore library locked to the F7 series of ST eval boards with an H7 series ST eval board. You need to contact DSP Concepts and acquire an H7 version of our locked AWECore library.
6:16am
Hi everyone,
the issue is finally solved. As it turned out, H7 series requires hardware CRC block initialization in order to work properly in standalone mode. Adding these two lines of code before calling awe_loadAWBfromArray() solves the problem:
__HAL_RCC_CRC_CLK_ENABLE();
CRC->CR = CRC_CR_RESET;
Thank you very much to everyone who replied to my posts and especially Emmanuel Caplet from ST.
Regards,
Andrej.