This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[Concerto F28M35H52C1] SYSBIOS IPC message buffer lost

Other Parts Discussed in Thread: SYSBIOS

Dear All,

The default IPC MessageQ example is working fine on my Concerto processor. After placing the MessageQ_Put from the main task inside an ISR, the pointer to the message (msg) is pointing to 0x0 when entering the ISR. Allocation is fine and return a result to the C03SRAM, this pointer just gets lost when the code reaches the ISR. The memory allocation probably is done on the task heap, and gets lost while leaving the task?? Placing a while loop at the end of the task that allocated the memory, and thus preventing the function from closing, results in the memory behavior I need. The side effect now is that the function is eating all the CPU time in the while loop. An idea was placing some task sleep in the while, but this also results in a null-pointer when entering the ISR.

Since I rather change to static declarations :: Can I change this example to work on both the ARM and DSP core with both statically declared messages?? Trying this result in invalid heapID's on the DSP core while getting the message in the MessageQ_Get function. The message probably gets lost on its way to the DSP. Changing from dynamic to static looked to me like removing the allocation code and using the MessageQ_staticMsgInit to initialize the message.

While debugging the code, the allocations for the example (with Memory_Alloc and MessageQ_Alloc) are returning pointers to the normal ram (not shared). This means that static declarations also should work, right?

Could someone clarify how to change messageQ to use static messages?
The SYSBIOS IPC user guide "3.3.4.2 MessageQ Allocation Without a Heap" only talks about the the MessageQ_staticMsgInit and not using MessageQ _free.

Greetings,
Danny

  • Danny,

    Sounds like you are doing a MessageQ_alloc() in your task but doing a MessageQ_put() in your ISR?  How are you saving your pointer to the alloc?  Unless you save this pointer as a global, I don't see how the ISR knows what the pointer is.  The task has a stack, it doesn't have a heap.  Some heaps aren't allowed to be allocated from an ISR but from a task any heap is allowed to be alloc'ed.  Static allocated messages are supported but I don't think that will solve your problem.  This definitely sounds like a scope problem to me.

    Judah