Hi Danilo
Yeah, I guess being a very bare metal programmer from the old 128 byte 
RAM days, , I dislike MALLOCs in embedded code on principal.

However, because the heap usage would be deterministic, it should be 
fairly safe.

*******************************************************************************
Take a look at the memory management routine  heap2.c in freertos.c
  (in fact, there are heap1,2,3,4,5 .c - a few options... try heap4, also)
-this is a much smarter memory alloc and dealloc routine that is fairly 
cheap.
much better than usual brain dead malloc.
********************************************************************************
I'd recommend using that. It looks for blocks same size, existing used etc

I would expect the same improvements on the F4 as the F7 using the CMSIS 
library. The F7 is much faster on that sort of code.

I only got rid of the FFT malloc stuff the huge stack additions are 
still in there
and you could save 50% there ...

-glen


On 16/09/2016 12:06 PM, Danilo Beuche wrote:
> Hi Glen,
>
> nice, would be interesting to see how much the STM32F4 gains by use of
> CMSIS FFT routines.
>
> BTW, I am not sure, but I think you mentioned the removal of malloc as
> one of your changes. For us with the mcHF it would not be good to have
> the memory for FreeDV code statically allocated since FreeDV is just one
> operation mode of the mcHF, and we need the memory at other times for
> other stuff, especially since it really eats a lot of memory (in
> relation to the STM32F4 RAM sizes). Even half of it is still a lot.
>
> Looking forward to gain some more free cycles with your work.
>
> Regards,
> Danilo
>
>
> Am 16.09.2016 um 03:53 schrieb glen english:
>> Hi Danilo
>>
>> yeah, you have plenty in hand.
>>    
>> OK so M7 and CMSIS FFT,  about 2 x speed (same clock) 7.74mS (1200bps)
>> for decode.
>>
>> On 16/09/2016 11:49 AM, Danilo Beuche wrote:
>>> H
>>>
>>> regarding the times @mcHF (STM32F4, 168Mhz) some clarifications: We
>>> measured 17.3ms per 40ms interval for the voice decode part only (this
>>> is only happening once the modem is synced) and roughly 5ms of
>>> fdmdv_demod per 20ms interval (happens all the time). Which gives us in
>>> total some 27ms per 40ms once synced. This is about 68% load.
>>>
>>> Regards,
>>>
>>> Danilo
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Freetel-codec2 mailing list
>>> Freetel-codec2@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/freetel-codec2
>>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Freetel-codec2 mailing list
>> Freetel-codec2@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/freetel-codec2
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Freetel-codec2 mailing list
> Freetel-codec2@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freetel-codec2
>



------------------------------------------------------------------------------
_______________________________________________
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to