-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data queue incorrect Behavior #2
Comments
I'm unable to reproduce this. Can you provide a test case? |
Hello, I attached the main file of a project. The problem appears when in task_MAIN_func executes first call to tn_queue_receive(queue_MAIN, &data, TN_WAIT_INFINITE) == TERR_NO_ERR Arian. From: Anders Montonen I'm unable to reproduce this. Can you provide a test case? —
#include <xc.h> #include "../tnkernel_2_5_908/tnkernel_2_5_908/source/tnkernel/tnkernel.h" #include "config.h" //#pragma config FSRSSEL = PRIORITY_7, FMIIEN = OFF // USN CLOCK #define PIC32_SOFTWARE_BREAK() asm volatile ("sdbbp 0") int PERIPHERAL_CLOCK = 0; TN_TCB* task_MAIN = NULL; static void task_MAIN_func(void * par); void tn_app_init(void); static void cdc_init_handler(void); tn_sys_interrupt(_CORE_TIMER_VECTOR)
} tn_sys_interrupt(_USB_1_VECTOR) ClearAllUsbInterruptFlags(); int main() config_pr_io(); // configure the core timer roll-over rate (10msec) // The Core timer should halt when we are halted at a debug breakpoint. // set up the core timer interrupt with a priority of 6 and zero sub-priority tn_start_system((TN_UWORD_)calloc(128, sizeof(TN_UWORD)), 128, return (EXIT_SUCCESS); void tn_app_init() task_MAIN = malloc(sizeof(TN_TCB)); queue_MAIN->id_dque = 0; event_USB_CDC_READY->id_event = 0; event_USB_CDC_IN->id_event = 0; event_USB_CDC_OUT->id_event = 0; fmp_EVENTS->id_fmp = 0; task_MAIN->id_task = 0; task_usb->id_task = 0; } void int_conf(void) INTEnableInterrupts(); /**
static void task_MAIN_func(void *par) lcd_open_dev(FOUR_BIT & LINES_5X7); setvbuf(stdout, calloc(STDIO_BUFF_SZ, sizeof(char)), _IOFBF , STDIO_BUFF_SZ); lcd_write_ram_addr(0); fputs("READY", stdout); usb_init(cdc_device_descriptor, initCDC(); cdc_register_startup_handler(cdc_init_handler); usb_start(); SetUsbGlobalInterruptPriority(INT_PRIORITY_LEVEL_6, INT_SUB_PRIORITY_LEVEL_3); lcd_write_ram_addr(LINE3_ADDR); // tn_sys_exit_critical(); tn_task_activate(task_usb); void* data = NULL;
// } static void cdc_init_handler(void) static void cdc_data_received_handler(void) static void cdc_data_transmited_handler(void) static void usb_in_wait_handler(void) static void usb_out_wait_handler(void) static void task_usb_func(void * par) do
} while(true); static enum { static unsigned int _epc_code; static const char* ExceptionName(unsigned int code) void attribute((naked, nomips16, noreturn)) _general_exception_handler(void) // printf("EX %s %X\n", ExceptionName(_epc_code), _excep_addr);
} void attribute((naked, nomips16, noreturn)) _general_exception_context(void)
} |
The code can't be compiled, since it is not self-contained, so it is not useful. Also, based on this: |
First call of receive queue function returns NULL data pointer instead of posted pointer.
The text was updated successfully, but these errors were encountered: