2017-05-18 06:19 AM
Hey everyone,
I'm trying to implement the osxAcousticEC library on a STM32F4-DISCOVERY. The first problem was that I wasn't able to compile the library as it is and had to change this in system_stm32f4xx.c -
- __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
+ const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
+ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};I was able to compile after making the above changes. However, when I connect the board to the PC and observe the audio output on Audacity, I just see a large amount of noise on the first channel (Channel with echo cancellation) and lesser noise on the second channel. I tried commenting the call to the function 'Send_Audio_to_USB' so that there's no audio sent to the USB at all. The second channel is now empty but there's still the same noise in the first channel. I've tried different boards and by connecting an external microphone instead of the on-board microphone but still have the same error. Can somebody help me out?
Thanks a lot in advance!
#acousticec #stm32-f42017-05-26 06:30 AM
Hi
nikilrao
,Which firmware version are you using ?
I have checked that
system_stm32f4xx.c file
in the last version of STM32CubeF4contains these lines:
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};Thanks
Imen
2017-05-26 08:40 AM
Hi Imen,
I'm using STM32Cube_FW_F4_V1.16.0. The
system_stm32f4xx.c included in the src folder of the osxAcousticEC library does not contain those lines. Thanks!
2018-02-16 10:16 AM
Hi Nikil Rao,
I am using STM32F407 board to implement osxAcousticEC library. However, I had your problem with the following error:
- __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
How can I fix this problem?
Could you please help me with your experience?
please do not hesitate to contact me.
mailto:mhajiabadifum@gmail.com
Regards,
Mojtaba Hajiabadi.
2018-02-16 02:40 PM
Ok, but what tool chain and what specific error are you getting?
It is only used in a few places, if you have it defined in multiple places consider localizing it within the scope of the function(s) it is being used in.
{
static const
uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
// local to here, not visible outside the scope of the braces
}
2018-02-18 08:20 AM
Dear Clive One,
Thanks for your answer.
My tool chain is MDK-ARM Keil uvision V.5.
I have solved the previous errors.
Now, my STM32F407 board is working but the problem is that, I can not
observe the Echo or Noise cancellation performance.
After compiling and downloading the codes onto the STM32F407 board, the 4
LEDSs are blinked and 3 audio sound are played from the DAC audio output
jack of my board.
Could you please help me with a picture of your board USB connection?
I have read in the application notes and datasheets that we should connect
the USB to a host PC as a USB Audio Device.
This UBS port is different from the programming / debugging port?
On Sat, Feb 17, 2018 at 1:10 AM, Clive One <st-microelectronics@jiveon.com>
2018-02-18 05:20 PM
You'd probably want a picture from Nikil Rao, not me.
The STM32F407-DISCO board has two USB jacks, the one at the 'South' end with the audio jack is the one connected physically to the F407 part. You could perhaps test this further by building a VCP or MSC type device, or using the 'firmware upgrade' code in the SPL to connect to a USB Flash drive via this connector.
The USB at the 'North' end of the board connects to the F103 providing the ST-LINK functionality.
2018-02-18 09:09 PM
Dear Clive One,
I could download the codes and could run my STM32F407 for Acoustic Echo
Cancellation application.
However, the results are not desired at all.
How can I change the osx.AcousticEC codes?
I check all the xxx.c and xxx.h files.
There is not any way to access the echo cancellation codes, Am I right?
On Mon, Feb 19, 2018 at 3:51 AM, Clive One <st-microelectronics@jiveon.com>