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

FreeRTOS runs slow

Posted by kingsob on June 18, 2008
I am trying to get my WiMi coordinator to run using FreeRTOS, so I am adding all files from my coordinator project into my freertos project (the dsPIC demo)...

everything is going great, until i get to the last file ConfigFuses.c. When I add this file, the project starts to run very slowly.. it works.. but the lights blink ALOT slower.. if i remove this file, it continues to operate slowly.. so i assume it is modifying a project setting that it should not be... but i got no idea which one it is

I have tried starting with an empty project, and simply include this file.. so im faily confident it is this file causing the problems.. and help would be greatly appreciated!


Derek

/********************************************************************
* FileName:ConfigFuses.c
* Dependencies:
* Processor:PIC18, PIC24F, PIC24H, dsPIC30, dsPIC33
* tested with 18F4620, dsPIC33FJ256GP710
* Hardware:PICDEM Z, Explorer 16
* Complier: Microchip C18 v3.04 or higher
*Microchip C30 v2.03 or higher
* Company:Microchip Technology, Inc.
*
* Copyright and Disclaimer Notice for MiWi Software:
*
* Copyright © 2006-2007 Microchip Technology Inc. All rights reserved.
*
* Microchip licenses to you the right to use, modify, copy and
* distribute Software only when embedded on a Microchip
* microcontroller or digital signal controller and used with a
* Microchip radio frequency transceiver, which are integrated into
* your product or third party product (pursuant to the sublicense
* terms in the accompanying license agreement).
*
* You should refer to the license agreement accompanying this
* Software for additional information regarding your rights
* and obligations.
*
* SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF
* ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION,
* ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROCHIP OR
* ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE,
* STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL
* EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
* INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT,
* PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST
* OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY
* CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE
* THEREOF), OR OTHER SIMILAR COSTS.
*
*********************************************************************
* File Description:
*
*
*
* Change History:
* Rev Date Description
* 0.1 11/09/2006 Initial revision
* 1.0 01/09/2007 Initial release
********************************************************************/

/************************ HEADERS **********************************/
#include "Compiler.h"

/************************ DEFINITIONS ******************************/
#if !defined(HI_TECH_C) && defined(__18F4620)
#pragma romdata CONFIG1H = 0x300001
const rom unsigned char config1H = 0b00000110; // HSPLL oscillator

#pragma romdata CONFIG2L = 0x300002
const rom unsigned char config2L = 0b00011111; // Brown-out Reset Enabled in hardware @ 2.0V, PWRTEN disabled

#pragma romdata CONFIG2H = 0x300003
const rom unsigned char config2H = 0b00001010; // HW WD disabled, 1:32 prescaler

#pragma romdata CONFIG3H = 0x300005
const rom unsigned char config3H = 0b10000000; // PORTB digital on RESET

#pragma romdata CONFIG4L = 0x300006
const rom unsigned char config4L = 0b10000001; // DEBUG disabled,
// XINST disabled
// LVP disabled
// STVREN enabled
#elif defined(HI_TECH_C) && !defined(__PICC__) && defined(__18F4620)
__CONFIG(1,HSPLL);
__CONFIG(2,PWRTDIS & BORDIS & WDTDIS);
__CONFIG(3,CCP2RB3);
__CONFIG(4,STVRDIS & XINSTDIS & LVPDIS);
__CONFIG(5,UNPROTECT);

#elif defined(__PICC__) && defined(_16F877A)
__CONFIG(0x3F3A);
#elif defined(__PIC24F__)
// Explorer 16 board
_CONFIG2(FNOSC_PRI & POSCMOD_XT)// Primary XT OSC with 4x PLL
_CONFIG1(JTAGEN_OFF & FWDTEN_OFF)// JTAG off, watchdog timer off
#elif defined(__dsPIC33F__) || defined(__PIC24H__)
// Explorer 16 board
_FOSCSEL(FNOSC_PRI); //primary osc
_FOSC(OSCIOFNC_OFF & POSCMD_XT)// XT Osc
_FWDT(FWDTEN_OFF)// Disable Watchdog timer
// JTAG should be disabled as well
#elif defined(__dsPIC30F__)
// dsPICDEM 1.1 board
_FOSC(XT_PLL16)// XT Osc + 16X PLL
_FWDT(WDT_OFF)// Disable Watchdog timer
_FBORPOR(MCLR_EN & PBOR_OFF & PWRT_OFF)
#elif defined(__PIC32MX__)
#pragma config FPLLMUL = MUL_16, FPLLIDIV = DIV_2, FPLLODIV = DIV_1, FWDTEN = OFF
#pragma config POSCMOD = XT, FNOSC = PRIPLL, FPBDIV = DIV_4, WDTPS = PS128
#endif

#if !defined(__18F4620) && defined(__18CXX)
#error "Please update the configuration words for your device."
#endif

RE: FreeRTOS runs slow

Posted by kingsob on June 19, 2008
so i have narrowed it down to this one line

_FOSCSEL(FNOSC_PRI); //primary osc


however, my zigbee project does not work when i comment it out...


[ 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