FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [October 2008 Threads] internal flash with FreeRTOS?Posted by Allure99 on October 22, 2008 Hi
I have a problem when trying to write to flash on a AT91SAM7X256.
I have moved my flash-write functions to RAM.
I think I have it setup correctly.
The problem seems to be timing, because if I step through the flash write code, it works like a charm... but if I let it run full speed it crashes every time to the pabort!
Thanks!
regards
RE: internal flash with FreeRTOS?Posted by woops_ on October 22, 2008 Is this a freertos question? There are no flash write functions in freertos.
RE: internal flash with FreeRTOS?Posted by Allure99 on October 23, 2008 Yes the question is for freeRTOS.
I have project running on freeRTOS. I am using AT91SAM7X and Rowley Crosswork.
I am trying to use the internal flash to store/log data. My function seem to be running ok(write to flash) if I run it before RTOS vTaskStartScheduler();
and after i shift it into one of the task after scheduler start, I always end up in : dabort_handler: b dabort_handler ..........
Any idea how to write internal flash in RTOS?
many thanks!
regards HS
RE: internal flash with FreeRTOS?Posted by Tonau on June 17, 2009 Hello @ All,
I had the same problem. I made a funktion based on the code of the example project basic-internalflash-project. I tested the funktion in main before the scheduler starts and everything was fine. Then I moved it into a Task and nothing worked anymore.I discovered that two things are important. First you have to encapsulate your flash_write function with taskENTER_CRITICAL(); and taskEXIT_CRITICAL();. Second the system crashes if you use FLASHD_Unlock(AT91C_IFLASH, AT91C_IFLASH + AT91C_IFLASH_SIZE , 0, 0); and FLASHD_Lock(lastPageAddress, lastPageAddress + AT91C_IFLASH_PAGE_SIZE, 0, 0); to lock and unlock the flash pages. Dont ask me why this happens. But I found that no pages are locked so writing to flash should be no problem. Maybe anyone can explain this behavior.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|