Tympan / Tympan_Library

Arduino/Teensy Library for Tympan Open Source Hearing Aid
MIT License
122 stars 32 forks source link

RevD stop working with large program? #27

Open yuan9778 opened 3 years ago

yuan9778 commented 3 years ago

Dear Tympan team,

We recently bought 2 Tyampan RevD from your company. It works great with many examples.

We found that if we load some complicated algorithms in it, it will not work (no output and I hear nothing) even though the memory and storage limit is not reached. So my questions are:

1) Why RevD stop working? We know our algorithms work fine (we have tested them many times). Is it because the algorithms consume too much storage space and/or memory? We did find that reducing the size of a filter coefficients file makes RevD work again. Or because the delay caused by the complicated algorithms exceeds the limit you set up somewhere?

2) What is the size of storage and memory of RevD? I can't find it from your website. What is the limitation of them we can use for our program?

3) Is there a way to upgrade the hardware of RevD, including CPU, storage space and memory? Do you have a more powerful model for sale?

4) Is it possible to use a bluetooth earphone with microphone as audio input/output with RevD? At the same time, RevD should be able to connect to a smartphone so we can use the app.

I'm looking forward to your reply.

Thanks much, Sanqing

chipaudette commented 3 years ago

Hello Sanging,

I'm sorry that I missed this message earlier. Regarding your questions:

1) Unless you can share your code (via GitHub or other) I do not know why your code is not working. There are many reasons why real-time audio code might not work. It is certainly possible that you are trying to do too much processing and that you are running out of CPU. As discussed on your other issue, the Tympan RevD can do about 8 FIR filters (96-points, 24 kHz sample rate) and 8 WDRC compressors (again, 24 kHz sample) rate. Beyond this, you will have to simplify your processing. The easiest step is to switch to IIR filters from the FIR filters. Alternatively, we will soon be releasing a Tympan "RevE", which is based on the Teensy 4.1. This can achieve about 3x as much time-domain processing (such as IIR and FIR filters, or such as the WDRC processing). Or, if you prefer frequency domain processing, it is about 5x faster for FFTs and IFFTs.

2) For the Tympan RevD, the storage and memory are the same as the Teensy 3.6. The RevD is a Teensy 3.6 at heart. Per the Teensy 3.6 product page, the system has an ARM Cortex-M4 at 180 MHz (with floating point processor), 1024K Flash, 256K RAM, and 4K EEPROM.

3) As I mentioned above, we will soon be releasing the Tympan "RevE". This is built around a Teensy 4.1. This provides the Tympan with an ARM Cortex-M7 at 600 MHz (with floating point processor), 7936K Flash, 1024K RAM (512K tightly coupled), 4K EEPROM (emulated).

4) I do not know if the Tympan can connect to a Bluetooth headset. I know that the Tympan can connect to a phone such that the Tympan is the bluetooth headset (and can send audio to/from the phone) but I have never tried to connect a headset to the Tympan itself. I don't think that there is any technological limitation, I just don't know how to do it. Maybe Sparkfun has tried? The Bluetooth module is a BC127 and Sparkfun has an extensive tutorial on the BC127 with many different examples. Sorry I am not more help.

Chip