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.

RM46L852 + FreeRTOS Startup Issue

Other Parts Discussed in Thread: RM46L852, HALCOGEN

Hi everyone,

I am having a curious issue with setting up FreeRTOS on the RM46L852 HDK board where the timing seems completely off for roughly a minute after startup. A quick rundown of my environment:

IAR EWARM with a JLINK debugger

The RM46L852 HDK board

Halcogen 4.02.00

The problem I am having is that I have setup a simple task and am starting a single timer but the timer does not start for about a minute. In the timer I increment a counter, in the task I check the counter and use the state of it to toggle an LED. Simple enough. The code behaves strangely though, on startup (after starting the scheduler) the task (NOT the timer callback) executes thousands of times faster than it should be (it effectively ignores the wake time). The timer callback does not execute at all. However, after about 60 seconds (I am doing nothing during this time except letting the code execute) the timer callback starts executing (with the expected timebase) and the task also begins executing with the expected timebase (10 times a second (100ticks) instead of what appears to be constant).

The strangest part about the whole thing is that I do not understand why after about a minute everything suddenly works as expected. If anyone can shed some light on this that would be appreciated, I feel like I must be missing something obvious.

Regards,

Jonathan

  • Jonathan,

    I remember a problem using timer in FreeRtos.

    Can you have a look to this thread?

    Problem with HALCoGen FreeRTOS project - Arm-based microcontrollers forum - Arm-based microcontrollers...

    e2e.ti.com
    Other Parts Discussed in Thread: HALCOGEN Making a HALCoGen (v.04.00.00) FreeRTOS project for RM48 microcontroller. Got a problem with Software Timer functions

    Also, if you can share your project, I can have a look.

    Please let me know.

  • Hi Jean,

    I have actually read this thread and was aware that the MPU has potential for causing issues if I'm not careful. Because of this I only setup the timer before starting the scheduler, and I do not modify it anywhere else in this simple example.

    With the J-LINK configured to catch vectors, there are no aborts or anything like that occurring. The only vector it catches is the SWI/SVC vector.

    As I said, after that unusual delay (of roughly a minute) the timers and everything else start operating exactly as expected. I am simply unsure of what is causing this delay, or where to look.

    Any further recommendations would be appreciated.

    Regards,

    Jonathan
  • Update:

    I have rebuilt the project and used the blinky code as a template, instead of the directions on the free rtos website. While I cannot see any obvious differences in what I am doing with the code, clearly something isn't the same because this time things are working fine. I'll probably end up leaving this alone and write it off to forgetting to carry a 2 or something.

    Thanks,

    Jonathan