Activity for FreeRTOS Real Time Kernel (RTOS)

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    To be clear: You have two separate binaries. Service calls (SVC) are used for one binary to [effectively] call functions in the second binary. You want the second binary to be able to call blocking FreeRTOS functions, but can't because you are in an SVC handler. Is that correct?

  • Aaron Mills Aaron Mills posted a comment on discussion Open Discussion and Support

    Hi all, I am trying to use the SVC(=SWI) instruction as a way for a "user-level" FreeRTOS task to access an internal/kernel level API without them needing to be compiled together. I have a piece of code which does this nicely and I can pass values to and from the internal API. I think this scenario is very common. However, many of the SVC/supervisor calls can take a long time (e.g. sending a command to off-chip hardware and then waiting forthat external hardware) and I want the "user task" to to...

  • Richard Barry Richard Barry modified ticket #137

    xQueueOverwrite not compatible with QueueSets

  • Richard Barry Richard Barry posted a comment on ticket #137

    This is actually something that came up again in the forums very recently. Although in the forum I said I would just add an assert in the code to catch this occurance, I did actually attempt a fix (I say attempt as the code has not been tested so I don't know if it is a fix yet). In any case it will be in the next version once it is tested so I will close this ticket now.

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    Unfortunately the host of the Interactive forums no longer allow attachements, so we are looking for an alternative. For now the code can be attached to a forum post here, or you can just post a link to the code in the Interactive site.

  • Richard Barry Richard Barry modified a comment on discussion Open Discussion and Support

    I really hope this isn't an inappropriate posting and apologies if it is. Now you have this working nicely, would you be kind enough to put it on the interactive forum please? I am taking delivery of the SAME70 dev kit today and would like to get this up and running with Crossworks. I've got a few Atmel Studio projects going on Crossworks, so it shouldn't be too onerous a task. I will, likewise, put the Crossworks one on the forum when it's going.

  • DiBosco DiBosco posted a comment on discussion Open Discussion and Support

    I really hope this isn't an inappropriate posting and apologies if it is. Now you have this working nicely, would you be kind enough to put it on the interactive forum please? I am taking delivery of the SAME70 dev kit today and would like to get this up and running with Crossworks. I've got a few Atmel Studio projects going on Crossworks, so it shouldn't be too onerous a task. I will, likewise, put the Crossworks one on the forum when it's going. On 23/02/18 12:55, Ralph Hornecker wrote: After some...

  • Ralph Hornecker Ralph Hornecker posted a comment on discussion Open Discussion and Support

    After some tweeking I reached 30 Mbits/s reading and writing.

  • valadur valadur posted a comment on ticket #137

    Is there any news about this bug? If it is not fixed, I guess it deserves to be mentioned in the docs

  • glen english glen english modified a comment on discussion Open Discussion and Support

    POst script - seems you have found the problem. funny my system didnt show it. however left here for utility... Suggest using GCC align directives to align up the problematic structures. avoid packing unless you have some IO interface. Though I thought M3/M4 only had a problem with unaligned access on FP ? something to go on: If you have external memory, unaligned accesses are often not allowed . Unaligned access that cross memory regions are trouble, Unaligned access into bitbanded regions are trouble,...

  • glen english glen english posted a comment on discussion Open Discussion and Support

    Suggest using GCC align directives to align up the problematic structures. avoid packing unless you have some IO interface. Though I thought M3/M4 only had a problem with unaligned access on FP ? something to go on: If you have external memory, unaligned accesses are often not allowed . Unaligned access that cross memory regions are trouble, Unaligned access into bitbanded regions are trouble, and this gem in the M3 book " All Cortex-M3 external accesses are aligned. Unaligned support is only available...

  • glen english glen english posted a comment on discussion Open Discussion and Support

    Hi Richard OK, thanks for the reply. cheers

  • gsing gsing posted a comment on discussion Open Discussion and Support

    Hi, We use freertos + TCP to transmit data from server(zynq) to client(pc), we need high throughput, so I increase the windows size as below: /* Fill in the buffer and window sizes that will be used by the socket. */ xWinProps.lTxBufSize = 16*ipconfigTCP_TX_BUFFER_LENGTH; xWinProps.lTxWinSize = 32; xWinProps.lRxBufSize = ipconfigTCP_RX_BUFFER_LENGTH; xWinProps.lRxWinSize = 8; With this window size, we can see the throughput can reach 35M+ byte/s, but if unplug/plug cable quickly, after link gets...

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    Are you talking about the FREERTOS_SO_RCVTIMEO and FREERTOS_SO_SNDTIMEO options? If so I don't think it matters, you can change those options whenever you want. That doesn't hold for all options, such as window sizes, etc.

  • glen english glen english posted a comment on discussion Open Discussion and Support

    Hi I read the documentation on the use of setsockopt and the example has the following order- setsockopt is called AFTER the bind However in your provided code, setsockopt is called BEFORE the bind. Which is the intended order? regards glen english sample code and order at https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_Networking_Tutorial_TCP_Client_and_Server.html and extract of TCPServer_t *FreeRTOS_CreateTCPServer( from FreeRTOS_TCP_server.c xSocket = FreeRTOS_socket( FREERTOS_AF_INET,...

  • Mateusz Piesta Mateusz Piesta posted a comment on discussion Open Discussion and Support

    Hello, I have project which implements FreeRTOS+FAT and USB Host configured as MSC Class. The goal is to transfer files from PC to devboard's FAT inside RAM. The problems is, when I am creating or updating existing files from PC I see that correct data are transfered to RAM but FAT itself won't notice those changes, for example upon opening modified file or creating new one invoking ff_fopen will return NULL or will show old file size. After some code scavenging I found that this is happening due...

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    I am trying to integrate FreeRTOS with some other libraries which is already using ARM Systick timer for its internal operation. The tick rate is different from FreeRTOS configTICK_RATE_HZ. Which means i have to configure another timer for Free RTOS to use as tick timer. The Systick was intended for use by an RTOS, so your other option would be to update the other libraries to use a different timer. From https://www.freertos.org/low-power-ARM-cortex-rtos.html , steps are given how to use another...

  • Aimal Aimal modified a comment on discussion Open Discussion and Support

    Hi, I am trying to integrate FreeRTOS with some other libraries which is already using ARM Systick timer for its internal operation. The tick rate is different from FreeRTOS configTICK_RATE_HZ. Which means i have to configure another timer for Free RTOS to use as tick timer. From https://www.freertos.org/low-power-ARM-cortex-rtos.html , steps are given how to use another timer for FreeRTOS schaduler. My question is in the second step, i.e. xPortSysTickHandler() function. 1. Should xPortSysTickHandler()...

  • Aimal Aimal posted a comment on discussion Open Discussion and Support

    Hi, I am trying to integrate FreeRTOS with some other libraries which is already using ARM Systick timer for its internal operation. The tick rate is different from FreeRTOS configTICK_RATE_HZ. Which means i have to configure another timer for Free RTOS to use as tick timer. From https://www.freertos.org/low-power-ARM-cortex-rtos.html , steps are given how to use another timer for FreeRTOS schaduler. My question is in the second step, i.e. xPortSysTickHandler() function. 1. Should xPortSysTickHandler()...

  • A-Ge0 A-Ge0 modified a comment on discussion Open Discussion and Support

    Thank you! Wasnt aware of the CRITICAL sections feature! Thanks void button_callback(uint8_t gpio_num, button_event_t event) { taskENTER_CRITICAL(); if (mutex == 0) { mutex = 1; taskEXIT_CRITICAL(); if (gpio_num == button1_gpio) buttonUP_handle(4000); else if (gpio_num == button2_gpio) buttonDOWN_handle(4000); mutex = 0; } else { taskEXIT_CRITICAL(); printf("race condition, doing nothing"); } }

  • A-Ge0 A-Ge0 modified a comment on discussion Open Discussion and Support

    Thank you! Wasnt aware of the CRITICAL sections feature! Thanks void button_callback(uint8_t gpio_num, button_event_t event) { taskENTER_CRITICAL(); if (mutex == 0) { mutex = 1; taskEXIT_CRITICAL(); if (gpio_num == button1_gpio) buttonUP_handle(4000); else if (gpio_num == button2_gpio) buttonDOWN_handle(4000); mutex = 0; } else { taskEXIT_CRITICAL(); printf("race condition, doing nothing"); } }

  • A-Ge0 A-Ge0 modified a comment on discussion Open Discussion and Support

    Thank you! Wasnt aware of the CRITICAL sections feature! Thanks

  • A-Ge0 A-Ge0 posted a comment on discussion Open Discussion and Support

    Thank you!

  • Pablo Devanne Langlais Pablo Devanne Langlais posted a comment on discussion Open Discussion and Support

    I decided to upgrade the source of FreeRTOS to v8.2.3, some additionnal configAssert() are defined and were useful to detect an unitialized timer caused the Hard Fault described above. Thanks for your support and quick responses !

  • Richard Damon Richard Damon posted a comment on discussion Open Discussion and Support

    If these are functions called by a Pend from ISR call, then they will run from a common task (the Timer/Service Task) and thus will properly interlock with each other, the problem being that they don't have the right signature for those. If you have some other singular button task that processes all buttons and calls these as appropriate, then again, you have an external interlock to avoid the race condition in the functions. Without something like this, you code has a race condition in that you...

  • A-Ge0 A-Ge0 modified a comment on discussion Open Discussion and Support

    I am trying to make sure that when button1 triggers a task, button2 is not able to trigger its task. At any time only button1 or button2 should be on if they were connected to a LED. I am using this code, does it do the job? what happens if the two interrupts fire simultaneously? void button1_callback(uint8_t gpio_num, button_event_t event) { if (up_task_handle == NULL && down_task_handle == NULL) { xTaskCreate(button1_task, "UP Task", 128, NULL, 2, up_task_handle); } } void button2_callback(uint8_t...

  • A-Ge0 A-Ge0 posted a comment on discussion Open Discussion and Support

    I am trying to make sure that when button1 triggers a task, button2 is not able to trigger its task. At any time only button1 or button2 should be on if they were connected to a LED. I am using this code, does it do the job? what happens if the two interrupts fire simultaneously? void button1_callback(uint8_t gpio_num, button_event_t event) { if (up_task_handle == NULL && down_task_handle == NULL) { xTaskCreate(button1_task, "UP Task", 128, NULL, 2, up_task_handle); } } void button2_callback(uint8_t...

  • Ralph Hornecker Ralph Hornecker posted a comment on discussion Open Discussion and Support

    Thanks Hein for providing the driver. After some simple tests with the board I reached a writing throughput of about 1Mbits/s and reading about 15Mbit/s. I think that this can be further improved.

  • Ralph Hornecker Ralph Hornecker posted a comment on discussion Open Discussion and Support

    Thanks Hein for providing the driver. After some simple tests with the board I reached a writing throughput of about 1Mbits/s and reading about 15Mbit/s. I think that this can be further improved.

  • KIM BONGSIK KIM BONGSIK posted a comment on discussion Open Discussion and Support

    I know that ulPortSetInterruptMask() masks interrupt. I will check interrupt priirity and mask. Thank you for your support.

  • KIM BONGSIK KIM BONGSIK posted a comment on discussion Open Discussion and Support

    I know that ulPortSetInterruptMask() masks interrupt. I will check interrupt priirity and mask. Thank you for your support.

  • KIM BONGSIK KIM BONGSIK modified a comment on discussion Open Discussion and Support

    Hello, Richard Thank you very much for your reply. I think (pxItemToRemove->pvContainer) value should be address of a List.(0xF100~~~) I think I solved this problem now temporary. There was a problem about entering critical section. I use vPortEnterCritical() function for enterting critical section. vPortEnterCritical() calls the ulPortSetInterruptMask(). ulPortSetInterruptMask() disables interrupt and sets portICCPMR_PRIORITY_MASK_REGISTER. And then it enables interrupt. I think critical section...

  • KIM BONGSIK KIM BONGSIK posted a comment on discussion Open Discussion and Support

    Hello, Richard Thank you very much for your reply. I think (pxItemToRemove->pvContainer) value should be address of a List.(0xF100~~~) I think I solved this problem now. There was a problem about entering critical section. I use vPortEnterCritical() function for enterting critical section. vPortEnterCritical() calls the ulPortSetInterruptMask(). ulPortSetInterruptMask() disables interrupt and sets portICCPMR_PRIORITY_MASK_REGISTER. And then it enables interrupt. I think critical section is not protected...

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    If the task being notified has already been created, but the scheduler has not been started (so the task cannot be in the Blocked state), then it is probably ok. However I have never tried it and this is not how the feature was ever intended to work - so has not been tested.

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    Looking at prvProcessReceivedCommands() in timers.c I see all these commands are handled in the same switch case: switch( xMessage.xMessageID ) { case tmrCOMMAND_START : case tmrCOMMAND_START_FROM_ISR : case tmrCOMMAND_RESET : case tmrCOMMAND_RESET_FROM_ISR : case tmrCOMMAND_START_DONT_TRACE : So it looks like the difference in function naming is purely to assist with reading code. The function name indicates the intent of the application writer - e.g. resetting a timer that the application writer...

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    Duplicate of https://sourceforge.net/p/freertos/discussion/382005/thread/6f987ded/

  • Andrew Sund Andrew Sund modified a comment on discussion Open Discussion and Support

  • Andrew Sund Andrew Sund modified a comment on discussion Open Discussion and Support

    Double post, please delete.

  • Andrew Sund Andrew Sund posted a comment on discussion Open Discussion and Support

    In the documentation for the timer functions: xTimerStart If the timer had already been started and was already in the active state, then xTimerStart() has equivalent functionality to the xTimerReset() API function. xTimerReset If the timer had already been started and was already in the active state, then xTimerReset() will cause the timer to re-evaluate its expiry time so that it is relative to when xTimerReset() was called. If the timer was in the dormant state then xTimerReset() has equivalent...

  • Andrew Sund Andrew Sund posted a comment on discussion Open Discussion and Support

    In the documentation for the timer functions: xTimerStart If the timer had already been started and was already in the active state, then xTimerStart() has equivalent functionality to the xTimerReset() API function. xTimerReset If the timer had already been started and was already in the active state, then xTimerReset() will cause the timer to re-evaluate its expiry time so that it is relative to when xTimerReset() was called. If the timer was in the dormant state then xTimerReset() has equivalent...

  • unknowcoder unknowcoder posted a comment on discussion Open Discussion and Support

    Hello, I would like to know what the implication are if a function call xTaskNotify() before the scheudler starts? I understand that there are no task running so doing this makes no sense but at the moment we have code which does it and instead of pushing out a completely new release, for a bug we cannot find. We want to know if the kernel code is safe to do this. Thanks

  • Pablo Devanne Langlais Pablo Devanne Langlais posted a comment on discussion Open Discussion and Support

    Thansk for your quick answer Richard ! The CC2538 has a Cortex-M3 core. I don't think the expected value of the pxItemToRemove pointer would be the same as previously without the last bit set (when I try to modifiy this value I have a bus fault on an instruction prefetch). Could it be related to the configUSE_TICKLESS_IDLE option (which, by the way, is set in my project - but I tried without it and I have the same behavior). To me, upgrading to FreeRTOS V10 would be the last option, uour firmware...

  • Richard Damon Richard Damon posted a comment on discussion Open Discussion and Support

    Or the other way to do it is to wrap your function that takes no parameters with an actual call back function that take a parameter, and have that call your function. It is also possible on many implementations to cast the type of the function to the needed type and it will just work, as long as the systems calling convention doesn't require the callee to clean up the parameter from the stack. This of course if very implementation dependent and not and not recommended unless you are really tight...

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    What should the value of the offending variable be? Could it be that it has simply been overwritten (I.e. accidentally corrupted).

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    The prototype of the function used as a timer callback must have the parameter, but that doesn’t mean the parameter has to be used inside the function - it can just be ignored. If you call the function directly just pass I’m NULL.

  • Jan Ropek Jan Ropek modified a comment on discussion Open Discussion and Support

    Hi, I want to use a FreeRTOS timer (on STM32L071), but I have never found the answer for my simple question. Can I use a callback function without the input parameters TimerHandle_t xTimer? I want something like this: void vTimerCallback( void ) { ... do semething } The reason why I want to use it in this way is, that I want to use my callback also as simple function which I can call from anywhere. Hope my question is clear. Thank you for answers.

  • Jan Ropek Jan Ropek posted a comment on discussion Open Discussion and Support

    Hi, I want to use a FreeRTOS timer, but I have never found the answer for my simple question. Can I use a callback function without the input parameters TimerHandle_t xTimer? I want something like this: void vTimerCallback( void ) { ... do semething } The reason why I want to use it in this way is, that I want to use my callback also as simple function which I can call from anywhere. Hope my question is clear. Thank you for answers.

  • KIM BONGSIK KIM BONGSIK posted a comment on discussion Open Discussion and Support

    I use also configASSERT(). I think this is not invalid interrupt priority problem. Because vPortValidateInterruptPriority() is passed successfully.

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    What core does a CC2835 have? I can't find that part number. From the description of the problem I'm guessing it's a Cortex-M. What is the vaue of pxItemToRemove meand to be? is it just that the last bit has got set? As a starting point I would recommend updating the FreeRTOS source files to V10 and ensure configASSERT() is defined to something that will halt the processor so you know it is called. Every version of FreeRTOS has additional configASSERT() calls to help catch misconfigurations.

  • Pablo Devanne Langlais Pablo Devanne Langlais posted a comment on discussion Open Discussion and Support

    Hi everyone, I'm running FreeRTOS V8.2.1 on a Texas Instruments CC2835, using IAR 8.20. I have a project running the same configuration fine, but the associated unit test project crashes at runtime. I have a Imprecise data access leading to an hard fault. With the debugger I was able to see an unaligned access when the uxListRemove() function is called by prvProcessExpiredTimer(), the value of pxItemToRemove is 0x000013C1. Thanks to the call stack, I know this occurs in the context of the prvTimerTask....

  • KIM BONGSIK KIM BONGSIK modified a comment on discussion Open Discussion and Support

    Hello. I have a problem about exception. I am trying to debug but it's difficult to me. I searched about this problem. And I found similar question. https://www.freertos.org/FreeRTOS_Support_Forum_Archive/August_2014/freertos_uxListRemove_results_in_address_exception_20cf7379j.html But I couldn't get information i want. I'm using FreeRTOS v9.0.0 on CortexA7. RAM address starts at 0xF1000000 There are 7 tasks and i use interrupt. configMAX_API_CALL_INTERRUPT_PRIORITY is 10. I use xEventGroupSetBits(),...

  • KIM BONGSIK KIM BONGSIK posted a comment on discussion Open Discussion and Support

    Hello. I have a problem about exception. I am trying to debug but it's difficult to me. I searched about this problem. And I found similar question. https://www.freertos.org/FreeRTOS_Support_Forum_Archive/August_2014/freertos_uxListRemove_results_in_address_exception_20cf7379j.html But I couldn't get information i want. I'm using FreeRTOS v9.0.0 on CortexA7. RAM address starts at 0xF1000000 There are 7 tasks and i use interrupt. configMAX_API_CALL_INTERRUPT_PRIORITY is 10. I use xEventGroupSetBits(),...

  • Panopticon Panopticon modified a comment on discussion Open Discussion and Support

    If you are going to use RMA (and yes, it is absolutely used in commercial systems with hard real-time deadlines, such as medical devices, automobile ECUs and avionics, just to name a few), it is a very rigorous process. Unfortunately, I don't have time to answer all the questions (especially because answers typically beget more questions, the life of a consultant....) but: with RMA, when the deadline is shorter than the period, model the task as though its deadline is its period (a la deadline monotonic)....

  • Panopticon Panopticon posted a comment on discussion Open Discussion and Support

    If you are going to use RMA (and yes, it is absolutely used in commercial systems with hard real-time deadlines, such as medical devices, automobile ECUs and avionics, just to name a few), it is a very rigorous process. Unfortunately, I don't have time to answer all the questions (especially because answers typically beget more questions, the life of a consultant....) but: with RMA, when the deadline is shorter than the period, model the task as though its deadline is its period (a la deadline monotonic)....

  • Bill Nye Bill Nye posted a comment on discussion Open Discussion and Support

    I do not have a safty critical application. We have to read many sensors very fast and make decisions dynamically based on the sensor data. We are talking about processing samples every 25uS or so. I will have it so it's collecting data for 200uS and then will go into a blocking state for 100uS and that cycle repeats. During those 100uS breaks I need to service communications like USB and other non-standard communication protocols with dealines. Of course that is just one small part of a real world...

  • Hein Tibosch Hein Tibosch posted a comment on discussion Open Discussion and Support

    We are using a port with 64MHz CPU clock which is stable. The configTICK_RATE_HZ is set 1000 Richard asked you a lot more. The information he's asking for is necessary to make a correct diagnosis. These were his questions: Which port are you using? Richard is asking what platform and CPU you are using ( and please be exact about this ). Does the chip have a stable and accurate clock? Or is it using a lower accuracy internal resonator? The phrase "64MHz CPU clock which is stable" is not really convincing....

  • Richard Damon Richard Damon posted a comment on discussion Open Discussion and Support

    First, note that Tasks and Interrupts are different class of things, and their priorities doen't directly interract, until you break up the interrupt processing into two piece, by moving part of it into a task-like operation (maybe not quite just a task, as you get features like the FreeRTOS timer/pend function task that can do some things at a lighter weight than using a full task for each thing. Deadline based priorities I find tend to be a good starting point. Mutex Priority Inheretance helps...

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    First you have to decide what the requirements of your system are, and how much spare cpu cycles you have. Most applications only have a few, if any, really hard real time requirements and planets of spare cpu cycles, so ensuring the real time responses is not too difficult. Only if you have multiple hard real time requirements and little spare cpu time, or a safety critical system that must be mathematically probable, is such scrutiny required. Do you fall into one of those categories?

  • Bill Nye Bill Nye posted a comment on discussion Open Discussion and Support

    I am trying to choose the best scheduling algorithm for my application. My application will have periodic tasks, non-periodic tasks and interrupts. The schedualing algorithm that shows up most on google is RMA (Rate Monotonic Analysis). But this is for periodics tasks and does not seem to account for the possibility of mutual exclusion with a lower priority task. Not to mention the priority of a task is only assigned based on its period. What if I have a task with a period of 1000 Seconds and needs...

  • Richard Barry Richard Barry committed [r2529]

    Allow IP address to be passed into gethostbyname().

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    Did you also take the trace recorder code from the v10 download and ensure you are using aa recent version of the UI?

  • santhosh kalwacherla santhosh kalwacherla modified a comment on discussion Open Discussion and Support

    At present i am using the Free RTOS version 10.0.1 for the tracealyzer . So here the main problem is when i am running the tracealyzer it saying that your using the older version . can any one help me??

  • santhosh kalwacherla santhosh kalwacherla posted a comment on discussion Open Discussion and Support

    At present i am using the Free RTOS version 10.0.1 for the tracealyzer . So here the main problem is when i am running the tracealyzer it saying that your using the older version . can any one help me??

  • gregd29 gregd29 posted a comment on discussion Open Discussion and Support

    The code is running from external quad SPI flash. I agree that this is a strange place for a fault to occur. That particular instruction is not supposed to cause any exceptions. The error message indicated an invalid instruction so I would agree that it must be some type of corruption. The IAR IDE showed the proper intruction and machine code in the dissasembler. I assumed that it read the code from target memory but it may actually read from source code. I should have thought to open up a memory...

  • Jiří Hušák Jiří Hušák posted a comment on discussion Open Discussion and Support

    Hi Richard, thank you fro addressing this issue. could you please update us on this topic? Thanks, BR, Jiri

  • Quentin Lohri Quentin Lohri posted a comment on discussion Open Discussion and Support

    Thanks for the response. Pity that we doesn't have this feature. Hope this can be implement in the future. For the moment I will implement a second heap management from the heap_4 with new functions Malloc() and free(). Thanks again, Greetings

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    It would seem odd to fault on that instruction as it should work whatever value was in PSP. Are you executing rom RAM or Flash? If RAM, can you be sure the instruction has not been corrupted in RAM - so if you read the contents of RAM back it decodes to the correct mrs r0, psp instruction expected. Alternatively, could it me an imprecise fault so the fault actually occurred on an earlier instruction? There is some code at the bottom of this https://www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html...

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    Currently heap_5 doesn't give you the ability to select the regions - it just uses all the regions as a single heap. Maybe this is something we could add in future - possible as a separate allocation function with an extra parameter.

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    Some work was done in the last version to remove compiler warnings generated by newer versions of the compiler - although I agree this doesn't look right so I will investigate.

  • Hein Tibosch Hein Tibosch posted a comment on discussion Open Discussion and Support

    the RTOS Tasks seem to restart That is not normal :-) I would first check the regular things, as described here. Make sure that all task stacks are big enough, make sure that configASSERT() is defined. Could there be a relation with interrupts or exceptions? What about the Watchdog Timer? Are you sure it isn't causing a reset? Can you put a break at the beginning of main(), or even earlier?

  • Hein Tibosch Hein Tibosch posted a comment on discussion Open Discussion and Support

    the RTOS Tasks seem to restart That is not normal. I would first check the regular things, as described here. Make sure that all task stacks are big enough, make sure that configASSERT() is defined. Could there be a relation with interrupts or exceptions? What about the Watchdog Timer? Are you sure it isn't causing a reset? Can you put a break at the beginning of main(), or even earlier?

  • Craig McQueen Craig McQueen modified a comment on discussion Open Discussion and Support

    In FreeRTOS/Source/portable/GCC/ARM_CM0/port.c, there is a line: #if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) But that doesn't make sense -- wouldn't it always be false? I wonder if it should instead be: #if !(defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) or maybe: #if !defined (__ARMCC_VERSION) || (__ARMCC_VERSION >= 6010050) But I don't know since I don't have a thorough knowledge of the behaviour of the different types of compilers that were considered when this...

  • gregd29 gregd29 posted a comment on discussion Open Discussion and Support

    Hello, I have been using FreeRTOS (currently v9.0.0) on our LPC4350 application for several years. It is used on the M4 processor but not the M0. I have had three boards running tests in an evironmetal chamber for the past several days with no issues while doing real time clock calibration tests. When I checked on my tests this morning, I noticed that the M4 processor on all three boards had locked up. I connected each one to my J-Link, IAR EWARM and connected to running target to determine what...

  • Craig McQueen Craig McQueen posted a comment on discussion Open Discussion and Support

    In FreeRTOS/Source/portable/GCC/ARM_CM0/port.c, there is a line: #if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) But that doesn't make sense -- wouldn't it always be false? I wonder if it should instead be: #if !(defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) or maybe: #if !defined (__ARMCC_VERSION) || (__ARMCC_VERSION >= 6010050) But I don't know since I don't have a thorough knowledge of the behaviour of the different types of compilers that were considered when this...

  • Sumanth Murali Sumanth Murali posted a comment on discussion Open Discussion and Support

    Any updates?

  • Sumanth Murali Sumanth Murali posted a comment on discussion Open Discussion and Support

    We have FreeRTOS running on ARM M4. After running the application for a while, the RTOS Tasks seem to restart without the MCU resetting. What could cause this?

  • Quentin Lohri Quentin Lohri posted a comment on discussion Open Discussion and Support

    Hi, freeRTOS version: 10.0.0 uC: stm32f217 Compiler IAR 7.60.0 C99 I'm using now the heap_4 with 1 region heap available for the dynamic allocation. I'm using the linker script to define where is the region start address. All is ok with my implementation. Now I want use heap_5 with the possibility to define several heap region. With this concept all is ok. My question is about the fact to use this regions. How to choose on which region we ant to make the allocation ? Eg. I want allocate a "object"...

  • Richard Barry Richard Barry modified a comment on discussion Open Discussion and Support

    Read the documentation.

  • Richard Barry Richard Barry modified a comment on discussion Open Discussion and Support

    A quick look at the documentation one will find: https://www.freertos.org/xTaskCreateStatic.html A quick search of the source code on your computer will locate the reference code or macro for the function.... if it’s not there, you are most likely running an old version of FreeRTOS.

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    https://www.freertos.org/Static_Vs_Dynamic_Memory_Allocation.html

  • lafleur lafleur posted a comment on discussion Open Discussion and Support

    Read the documentation. . ~~ /) ~~~~ /) ~~~~ /) ~~~~ /) ~~ Tom Lafleur On Feb 13, 2018, at 6:25 AM, Michael Nesher michaeln32@users.sourceforge.net wrote: Can I use API xTaskCreateStatic() in my application or it is only for kernel use ? xTaskCreateStatic Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/ To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

  • lafleur lafleur posted a comment on discussion Open Discussion and Support

    A quick look at the documentation one will find: https://www.freertos.org/xTaskCreateStatic.html A quick search of the source code on your computer will locate the reference code or macro for the function.... if it’s not there, you are most likely running an old version of FreeRTOS. ~~ /) ~~~~ /) ~~~~ /) ~~~~ /) ~~ Tom Lafleur On Feb 13, 2018, at 5:13 AM, Michael Nesher michaeln32@users.sourceforge.net wrote: Thank you ! I cant find the API xTaskCreateStatic(). Can you please tell me wher this function...

  • lafleur lafleur posted a comment on discussion Open Discussion and Support

    Sure you can, just try it in a small test program.. On Tue, Feb 13, 2018 at 6:32 AM Michael Nesher michaeln32@users.sourceforge.net wrote: Can I use both API xTaskCreateStatic() and xTaskCreate() and in my application ? xTaskCreateStatic https://sourceforge.net/p/freertos/discussion/382005/thread/5bb81397/?limit=25#1b40 Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/ To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/...

  • Michael Nesher Michael Nesher posted a comment on discussion Open Discussion and Support

    Can I use both API xTaskCreateStatic() and xTaskCreate() and in my application ?

  • Michael Nesher Michael Nesher posted a comment on discussion Open Discussion and Support

    Can I use API xTaskCreateStatic() in my application or it is only for kernel use ?

  • Michael Nesher Michael Nesher modified a comment on discussion Open Discussion and Support

    Thank you ! I cant find the API xTaskCreateStatic(). Can you please tell me wher this function can be found (in which file) ?

  • Michael Nesher Michael Nesher posted a comment on discussion Open Discussion and Support

    Thank you ! I cant find the API xTaskCreateStatic(). Can you please tell me wher this function can be found (in which file) ?

  • Richard Damon Richard Damon posted a comment on discussion Open Discussion and Support

    xTaskCreateStatic requires you to provide both a buffer for the TCB and for the Stack, and doesn't use any of the Heap.

  • Michael Nesher Michael Nesher posted a comment on discussion Open Discussion and Support

    Hi, When we use xTaskCreateStatic() instead of xTaskCreate() - Are both task TCB and stack are created staticlly in the ram not in the RTOS heap section ? Thank you Michael

  • Mark Richards Mark Richards posted a comment on discussion Open Discussion and Support

    you are looking at very old code from the ASF rather than latest code from the FreeRTOS download I'm using what has been published by Atmel/Microchip/whoever. Hmmm... well that's likely the issue. If they have not updated it, and it's broken (apparently so) then I'll get on their ass and see what gives. Thanks for your help!

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    So, if we're not supposed to use async, why the dickens is it defined in? Not sure I understand the statement about not supposed to use async. (should also point out that you are looking at very old code from the ASF rather than latest code from the FreeRTOS download)

  • Mark Richards Mark Richards posted a comment on discussion Open Discussion and Support

    #define freertos_twi_write_packet(p_twi, p_packet, block_time_ticks) freertos_twi_write_packet_async((p_twi), (p_packet), (block_time_ticks), (NULL)) is defined in freertos_twi_master.h! So, if we're not supposed to use async, why the dickens is it defined in? This is nuts :)

  • Mark Richards Mark Richards posted a comment on discussion Open Discussion and Support

    Richard, I can get to your idea, but for the moment have another issue. After initializing: bool InitTWI(void) { freertos_peripheral_options_t driver_options = { NULL, 0, 0x0e, TWI_I2C_MASTER, (WAIT_TX_COMPLETE | WAIT_RX_COMPLETE) }; flexcom_enable(BOARD_FLEXCOM_TWI); flexcom_set_opmode(BOARD_FLEXCOM_TWI, FLEXCOM_TWI); freertos_twi=freertos_twi_master_init(BOARD_BASE_TWI, &driver_options); if (freertos_twi == NULL) { puts("-E-\tTWI master initialization failed.\r"); return(false); } twi_set_speed(freertos_twi,TWI_SPEED,F_CPU);...

  • Poulamee Sur Poulamee Sur modified a comment on discussion Open Discussion and Support

    The Queue value is not changed, the Global variable got changed . Whatever value I'm sending via Queue when it is going to Queuereceive, the Global variable got changed I'm using the configASSERT for handling the queue. And also I have defined configASSERT(expression) oin FreeRTOSConfig.h , but this issue is there .

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    The interrupt being fired is from a peripheral (ADC), signaling that the data is ready to read. Therefore I must service it or lose the data. That doesn't mean you have to read all the data in the interrupt though. Either just start the read operation in the interrupt and let interrupts or DMA complete the read - or somehow signal a task (direct to task notifications are the best method, but not available in the older versions you are using) to unblock the task so the task performs the read.

  • Mark Richards Mark Richards posted a comment on discussion Open Discussion and Support

    Richard, thank you. The interrupt being fired is from a peripheral (ADC), signaling that the data is ready to read. Therefore I must service it or lose the data. Investigating this further, I discover that hacking within an ISR may be unnecessary as there's a FreeRTOS TWI driver. So I added the driver (through Atmel ASF) and it wouldn't compile. Offered two complaints on freertos_twi_master.h, both referring me back to the Freertos Version 8 compatibility chart. I never expected this in a file that's...

  • Richard Barry Richard Barry posted a comment on discussion Open Discussion and Support

    As a rule of thumb, no FreeRTOS API functions that don't end if "FromISR" can be called from an ISR. In this case there is an xSemaphoreTakeFromISR() function - however recent versions of FreeRTOS do not allow mutex semaphores to be used from interrupts. There are a couple of reasons for that, the first is an interrupt cannot block on a semaphore (or anything else for that matter) so if the mutex is not available then it has to just fail gracefully. The second is that mutexes have a priority inheritance...

  • Mark Richards Mark Richards posted a comment on discussion Open Discussion and Support

    Processor SAMG55 Dev System: Atmel Studio with ASF version of FreeRTOS (version 8.0.1) I am using xSemaphoreTake ( semaphorescreated using xSemaphoreCreateMutex()). These work perfectly except... One particular semaphore protects TWI communications so that, under circumstances where one process has TWI in work and an interrupt is triggerd which also uses TWI, the ISR will not clobber the TWI interface. However, xSemaphoreTake() says that it can't be called from within an ISR. How can I protect TWI...

  • Hein Tibosch Hein Tibosch posted a comment on discussion Open Discussion and Support

    Please find attached a driver that should both work for SAME70 as well as SAM4E. The DMA errors were solved when I set the bit GMAC_DCFGR_TXPBMS to '1' (see PDF). Regards,

  • Hein Tibosch Hein Tibosch posted a comment on discussion Open Discussion and Support

    Thank you for reporting this. Application hooks like vApplicationIPNetworkEventHook() often have a risk: they are called from a different task. The same for vApplicationIdleHook() (called form the idle task), and vApplicationTickHook() (called from an ISR, the FreeRTOS clock-tick interrupt). In this case you were calling a +TCP API from the IP-task. I also made this mistake some day. What I did is just set a variable from within vApplicationIPNetworkEventHook(). it would be ok if bind function returned...

1 >