The bug does not come from the usb_debug_printf function because I noticed before that I had bit losses. As I didn't understand that's when I used the usb_debug_printf function.
I did the tests this way:
md380 with C5000 with modified md380tools firmware (the same way I showed my code above) for (int i=0;i<49;i++) bufferambe [ i ] =... every bit of the silence frame
but I did the same thing with a UV380, a UV380 PLUS, a UV390 PLUS, a DM1701.
Therefore:
md380 C5000 -> md380 C5000, no bits lost or changed
md380 C5000 -> uv380 opengd77 c6000 or uv380 plus or uv390 plus or dm1701, lost bits
UV 380 or UV380 Plus or UV390 Plus or DM1701 OpenGD77 -> UV380 or UV380 Plus or UV390 Plus or DM1701 Bit Lost
I did all the possible configurations.
and even: UV380, UV390 Plus, UV380 Plus, DM1701 -> MD380 C5000 No Bit Lost
So in transmission with OpenGD77: no bit lost only loss on RX with md380 C5000.
And so on DSD-FME, we don't see any bit loss because it's only in RX on OpenGD77 that the bits are lost.
I don't use the microphone for my tests, it's after the microphone in the ambe buffer that I change the data. so no modulation problem because I change the data after the WAV to AMBE conversion and before the FEC conversion.Your presumption that there is a in the code presumes that the C6000 is receiving clean audio from the receiver and that your modulation is clean, or have you already verified this?
I was able to verify with DSD-FME that the ON AIR transmissions are without transmission error.
That's why I would have liked (if possible) a developer to be able to confirm what I found, even without looking for the bug. Just to confirm that what I found also exists with him. There are just two lines of code to add in TX and two lines to add in RX.The TRx chip used in the UV380 is totally different from the Tx Rx system in the MD380 and the Rx side of the TRx chip is known to be poor quality and also susepetable to interference both in band and out of band, and also is not tollerant of signal overloading.
Currently there are many places in the process where your 'silence frame' data could have errors introduced. I don't understand your presumption that this must be a bug in the firmware, when it could be a RF / AF problem
If adding the two lines is a problem, I can post here the codec_interface.c file to add it to the project and recompile but it seems easier to me to add the two lines of code (in my opinion).
I don't have that technical ability, I just know how to work at the software level.To remove the possiblity that its a RF / AF problem you would need to generate the 4FSK AF encoded signal some other way, and directly inject this into the PCB of the radio, and then adjust the modulation level and attempt to confirm whether this problem is AF/RF
USB Debug printing works perfectly well with the March 2023 code. just it doesn't work anymore with the December 2023 code. What did you do about the December 2023 code to make it no longer work?If this is not fast enough you will need to change the clock settings for the entire chip. If you change the CPU clock frequency so that everything runs faster, that you need to ensure that the clock multiplier and divider frequencies provide the correct clock speed for the USB subsystem in the STM32, otherwise USB won't work. Also check the GPIO / SPI / I2C subsystem clock dividers etc to ensure you are not overclocking them if you increase the CPU core frequency.
