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

PIC18 usung PLL hangs

Posted by Bob Cobb on August 29, 2008
I'm using FreeRTOS with a PIC10F87J11. I have three tasks, an LCD task, an I2C task, and an application task. All use queues to pass info back and forth. The external clock source is 10 MHz, and the clock option is ECPLL. All works well at 10 MHz. My problem starts as soon as I turn on the 4x PLL (OSCTUNEbits.PLLEN). The system hangs in several ways. It can do constant resets, it can corrupt the scheduler suspend variable (uxSchedulerSuspended), or it will hang in the vListInsert function, specifically at the pxIterator for(;;) loop. I have checked for stack overflows and other obvious things. Can this be a timer issue? Does anyone have a suggestion as to what else to check into?

RE: PIC18 usung PLL hangs

Posted by Dave on August 29, 2008
Did you change the configCPU_CLOCK_HZ parameter in FreeRTOSConfig.h?

RE: PIC18 usung PLL hangs

Posted by Bob Cobb on August 29, 2008
Yes, I changed it to 40000000 to match the 40MHz core speed. My tick frequency (configTICK_RATE_HZ) is 100, but I have tried it at 1000 and 500 with no difference in the problem. I am using the clock interrupt source as is, with the CCP set to compare. I don't know if this works properly with the PLL. I might change that to see what happens.

RE: PIC18 usung PLL hangs

Posted by woops_ on August 29, 2008
Check the calculations in prvSetupTimerInterrupt (port.c) to see if the higher 4000000 number is causing an overflow in the timer compare value. Maybe you need to prescale the clock intput to the timer some more?

RE: PIC18 usung PLL hangs

Posted by Bob Cobb on August 29, 2008
if I set configCPU_CLOCK_HZ to 40000000, and configTICK_RATE_HZ to 500, I get 0x4E20 as the compare value. I know that seting configTICK_RATE_HZ to 100 will cause a calculation overflow, but that should only cause incorrect tick timing. I will explore the prescale suggestion, thanks!


[ 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