- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In my uC/OS project, I have the following task. In this task , I try to allocate a heap by using memalign function. void ButtonLed1(void) { OS_STK * task5_stk = (OS_STK *)memalign(TASK_STACKSIZE*sizeof(OS_STK)); while(1) { if(led_button_status & 0x01) { led_button_status &= 0xFE; bLedStatus = 0; IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE,bLedStatus); } OSTimeDlyHMSM(0, 0, 1, 0); } } But I failed. It stopped at the following position. /* wait on the other task to yield the heap, then claim ownership of it */ OSSemPend( alt_heapsem, 0, &err ); I'm sure that I didn't call any function to allocate heap in other tasks. So why it always be waiting heapsem? Could anyone help? Thanks in advance, DavidLink Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page