Richard Damon

Show:

What's happening?

  • Followup: RE: xTaskRestart()

    I would add that I find very little use for a task to delete/restart another, and it is almost always a better way to make a bigger mess than to clean things up. The problem is that, unlike processes on "big" operating systems, there is very little clean up that FreeRTOS does (or even can do). Resources taken by the task are NOT returned. Semaphores or Mutexes (I believe) taken are...

    2013-06-17 11:15:41 PDT in FreeRTOS Real Tim...

  • Followup: RE: rewrite queue struct or use freertos queue

    It might be possible to write a slightly more efficient queue knowing that one end is alway an interrupt routine, and maybe some others knowable special cases (like it is always 1 byte at a time being sent, if that is how you are doing it). I am not sure if the improvements are worth the extra work and risk of bugs.

    2013-06-12 20:15:29 PDT in FreeRTOS Real Tim...

  • Followup: RE: Structure protection: One writer, mult reader

    The pseudo code I posted gives readers priority (once you have started reading). It should be possible to implement priority to the write task, so that once the write task blocks waiting to get control, no other read tasks can enter the read lock state. One outline would be to have one semaphore grabbed by the first read task and release by the last reader, and a second one (or possibly a...

    2013-05-28 22:53:16 PDT in FreeRTOS Real Tim...

  • Followup: RE: Structure protection: One writer, mult reader

    I am not sure that code works, as readers don't block on anything if the writing task has the lock. Are you assuming that the write task doesn't need to block when it has the write semaphore? My thought is that you need 2 different things for signaling, as you have have tasks both waiting to get access to read and write if the semaphore is currently in write mode, and if the semaphore is...

    2013-05-27 22:10:11 PDT in FreeRTOS Real Tim...

  • Followup: RE: Infinite loop in heap_4..

    As was mentioned, the most likely cause is that the heap has been corrupted by accessing out side the bounds of a heap object (perhaps forgetting to +1 the value of strlen when allocating blocks on the heap). The other possibility is that the heap has been corrupted by multi-threading issues. One big one would be calling them from ISR routines (the heap_# routines are thread safe but not ISR...

    2013-05-25 18:14:54 PDT in FreeRTOS Real Tim...

  • Followup: RE: Non Blocking Task wont Give CPU To a Periodic

    The two most likely causes are 1) You have preemption turned off, thus the "non-blocking" task will never give up the processor unless you add a yield to the loop. 2) Your timer tick interrupt isn't working for some reason. You can check the first by adding the yield. The second by seeing if the tick counter is increasing.

    2013-05-10 19:56:14 PDT in FreeRTOS Real Tim...

  • Followup: RE: Tick count overflow

    If all math is done on portTickType, Tick_new - Tick_old will be the time difference modulus the roll over period (which is too big to be represented by portTickType), this is the nature of unsigned arithmetic in C. In your code above you really need to use MAXVAL+1, as this is how much time was lost in the roll over, but it turns out that the value of MAXVAL+1 will be 0 (due to rollover) so...

    2013-05-10 04:32:04 PDT in FreeRTOS Real Tim...

  • Followup: RE: Task doesn't complete

    Sounds like the problem is that if you take over a certain amount of time things have problems. It could be that the location is being used by an interrupt (have you checked you link map that the location is unused). It could be some interrupt corrupting something that causes this to crash.

    2013-05-06 22:22:47 PDT in FreeRTOS Real Tim...

  • Followup: RE: Task doesn't complete

    I don't see a definition of pointer here, I assume it is an int*. is the address 0x3000000 used by anyone? If this is in your ram space, if something has been placed here (like a FreeRTOS control structure), you may crash something.

    2013-05-06 04:43:49 PDT in FreeRTOS Real Tim...

  • Followup: RE: Weird characters coming from UART0

    My guess is that you have the baud rate set wrong, perhaps because you have the clock rate set wrong. I bet if you look at the serial port for transmit with a scope the bit time is off.

    2013-05-01 20:27:37 PDT in FreeRTOS Real Tim...

About Me

  • 2005-02-27 (8 years ago)
  • 1228781
  • richard_damon (My Site)
  • Richard Damon

Send me a message