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] [February 2009 Threads] MPLAB PIC18F Quick Start questionPosted by David Haile on February 11, 2009 I'm browsing around today between projects and thought I'd give FreeRTOS a try. I've ported the demos to a Microchip PIC18F4680 demo board - it was easy and the code is basically running. I have a couple of questions about FreeRTOS' treatment of Microchip's infamous configuration bits.
1.) How do I tell FreeRTOS how the CPU clock rate? I like to use a 32MHz internal oscillator.
2.) Did FreeRTOS anticipate Microchip's configuration bits? Where did it set them up? I scanned the source and didn't find any instances of "#pragma config" but maybe they did it some other way. Where is this documented?
I'm assuming that I have to add #pragma's to get it to run on the internal oscillator.
I'll eventually figure this out but this forum may give me the answer quicker.
David Haile Fort Collins, CO
RE: MPLAB PIC18F Quick Start questionPosted by Oleg Mazurov on February 11, 2009 1) #define configCPU_CLOCK_HZ in FreeRTOSConfig.h 2) No.
RE: MPLAB PIC18F Quick Start questionPosted by PICmeup on February 11, 2009 2) again. The PIC32 port sets up bits in main.c with #pragma. The PIC24 port uses the MPLAB IDE settings so no pragmas in source. Cant remember which method pic18 port use.
RE: MPLAB PIC18F Quick Start questionPosted by David Haile on February 11, 2009 Thanks a ton. I'll also checkout the PIC32 port and see what was done with pragma's. That's my preferred method.
RE: MPLAB PIC18F Quick Start questionPosted by David Haile on February 11, 2009 What a pain in the buttocks! I'm just trying to get any of the three standard demonstrations to work on a different processor than how the demo was written - PIC18F4680. I've figured out the linker script file differences, it compiles and runs, but vTaskStartScheduler() always returns - it never starts the tasks. I've gone through the "how to port to your hardware" and have put in a lot of debug code but haven't found the problem. I've increased the stack size to 256 and the heap size to 2048. Those are double the size as distributed.
I'm still working on it but would appreciate if someone would throw some hints up here. I'll give back to this community once I get the code working and become an "expert"!
RE: MPLAB PIC18F Quick Start questionPosted by Oleg Mazurov on February 11, 2009 vTaskStartScheduler() returns when there is not enough memory to start an idle task. Memory for idle task is defined in #define configMINIMAL_STACK_SIZE in FreeRTOSConfig.h. You may also want to take a look at this: https://sourceforge.net/forum/message.php?msg_id=5872795
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|