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.

RM48L952: Using FreeRTOS on RM48L952

Part Number: RM48L952
Other Parts Discussed in Thread: HALCOGEN

Hello

I use RM48L952 in product development.

Suddenly need to join FreeRTOS during the development process.

SO, I use HalCoGen to generate FreeRTOS code and add my driver.

I refer to this report.

www.ti.com/.../spna237.pdf

But there is a step I don't know how to do it, so I didn't do this step.

And then, I add about FreeRTOS code in my driver. (The code like os_tasks.c, os_tasks.h, and so on.)

I change the file of about sys_vim.c because I want to change the interrupt channel.

After that,  I use non FreeRTOS function, it works everything.

But  when I use FreeRTOS function, it doesn't work.

I don't know if the relationship that was not executed in that step caused this problem.

Can you tell me how to solve the problem?

Thanks and Regards

  • Hi Willy,

    If your freeRTOS code and cmd are generated directly from HALCoGen for RM48ls952ZWT, you don't need to change the cmd file.

    What are the changes you made to sys_vim?

    For freeRTOS, the VIM channel 21 (SSI) has to be enabled for SW interrupt. Did you run your code before making any changes?

    You said the function doesn't work. What is the real problem? Is the code stuck at somewhere, or you got abort,..?
  • Hi QJ Wang

    Thank you for your answer.

    I using version of HalCoGen is 04.05.02.

    The driver code I used originally was from HalCoGen for RM48L952ZWT, and it contained about rti code.

    I am using the RM48L952ZWT HalCoGen driver code development and suddenly want to join FreeRTOS.

    So I generate FreeRTOS code from HalCoGen for RM48L950ZWT_FREERTOS.

    And then, I add about FreeRTOS code (The code like os_tasks.c, os_tasks.h, and so on.)and replace sys_vim.c in my driver.

    Because the code is different from the previous one of HalCoGen for RM48L952ZWT, I replaced sys_vim.c.

    The difference in the code are interrupt channel 2 and interrupt channel 21.

    After that, I use sciSend function, and it is working ok.

    But I use about FreeRTOS function(it like xTaskCreate or vTaskStartScheduler), and it is working not ok.

    These are my test code of FreeRTOS.

    It does not output anythings on my terminal.

  • First, declare two global variables xTask1Handle and xTask2Handle with the type xTaskHandle as the handle of vTask1() and vTask2() respectively.

    Make sure the task is created correctly:

    if (xTaskCreate(vTask1,"Task 1", 1000, NULL, 1, &xTask1Handle) != pdTRUE)
    {
    /* Task could not be created */
    while(1);
    }

    Please use different priority for vTASK1 and vTASK2