Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560

Discussion Groups

Discussion Groups | TMS320C6x | Mem_Alloc and tsk 62x

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

Mem_Alloc and tsk 62x - sophisblu - Apr 22 23:22:33 2007



What is the problem? I'm trying to allocate external SDRAM memory in a
TSK function defined in a Configuration CDB file. However Mem_alloc in
TSK function fails. To test Mem_alloc, I was able to allocate in the
during the initialization of the System and see memory allocated in
Kernal Object viewer. So the problem must be in the system level.

I read up on Mem_allocs and found out that dynamic memory functions
are disabled in HWI and SWi.

This led me to think maybe HWI is causing my system to fail. My system
generates a HWI when the user presses a button. The resulting HWI is
serviced by an ISR that signals the semaphore for the Task. The task
function then calls Mem_Alloc. I'm guessing HWI here is preventing
memory to be allocated? If not, what are the things I should check?

I've checked Configuration and all the Memory segment sizes, they look OK.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

Re: Mem_Alloc and tsk 62x - Jeff Brower - Apr 23 8:19:12 2007

Sophis-

> What is the problem? I'm trying to allocate external SDRAM memory in a
> TSK function defined in a Configuration CDB file. However Mem_alloc in
> TSK function fails. To test Mem_alloc, I was able to allocate in the
> during the initialization of the System and see memory allocated in
> Kernal Object viewer. So the problem must be in the system level.
>
> I read up on Mem_allocs and found out that dynamic memory functions
> are disabled in HWI and SWi.
>
> This led me to think maybe HWI is causing my system to fail. My system
> generates a HWI when the user presses a button. The resulting HWI is
> serviced by an ISR that signals the semaphore for the Task. The task
> function then calls Mem_Alloc. I'm guessing HWI here is preventing
> memory to be allocated? If not, what are the things I should check?
>
> I've checked Configuration and all the Memory segment sizes, they look OK.

Try making the same Mem_alloc in main(), or another simple place in the code.  My guess is your
function fails there
also, which would mean the issue doesn't have to do with interrupts.

-Jeff



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

Re: Mem_Alloc and tsk 62x - Jeff Brower - Apr 23 16:26:25 2007

Sophis-

> Mem_alloc and Mem_free works in an idle task, so I assume they are
> working.

Ok, that's promising.  Do you have some other way to set the semaphore to cause your TSK
function to run?  I.e. if you
can "simulate" the interrupt, it might reveal something.  What if you create an OS
timer based periodic TSK function
that sets the semaphore every 1 msec?

-Jeff

> --- In c...@yahoogroups.com, "Jeff Brower" <jbrower@...> wrote:
>>
>> Sophis-
>>
>> > What is the problem? I'm trying to allocate external SDRAM memory in a
>> > TSK function defined in a Configuration CDB file. However Mem_alloc in
>> > TSK function fails. To test Mem_alloc, I was able to allocate in the
>> > during the initialization of the System and see memory allocated in
>> > Kernal Object viewer. So the problem must be in the system level.
>> >
>> > I read up on Mem_allocs and found out that dynamic memory functions
>> > are disabled in HWI and SWi.
>> >
>> > This led me to think maybe HWI is causing my system to fail. My system
>> > generates a HWI when the user presses a button. The resulting HWI is
>> > serviced by an ISR that signals the semaphore for the Task. The task
>> > function then calls Mem_Alloc. I'm guessing HWI here is preventing
>> > memory to be allocated? If not, what are the things I should check?
>> >
>> > I've checked Configuration and all the Memory segment sizes, they
> look OK.
>>
>> Try making the same Mem_alloc in main(), or another simple place in
> the code.  My guess is your function fails there
>> also, which would mean the issue doesn't have to do with interrupts.
>>
>> -Jeff
>



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )