Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists