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 2011 Threads] PIC32 changing timer?Posted by ulmus on October 18, 2011 I was searching forum but dont know exactly: I want to change Timer2 into Timer5. Timer2 which is choosen in PIC32 port is imho not good. Timer 2 is used e.g. in PWM implementation in PIC32. Id like to change timer2 into 5 and want to know if it has something to do with license or not? And the last thing: anyone has change already timer2? there is some tricks or only changing 2's into 5's in source? Thanx in advance :)
RE: PIC32 changing timer?Posted by Richard on October 18, 2011 Just change the implementation of prvSetupTimerInterrupt() in port.c, no problem.
Regards.
RE: PIC32 changing timer?Posted by ulmus on October 18, 2011 Not exactly, i can see something else in port.c:
extern void __attribute__( (interrupt(ipl1), vector(_TIMER_1_VECTOR))) vT1InterruptHandler( void );
enough to change _TIMER_1_VECTOR into _TIMER_5_VECTOR, name of function can stay ;)
I hope it's all :) but about licence: have to do something if i change those points of source?
RE: PIC32 changing timer?Posted by Richard on October 18, 2011 You are right of course - you also have to change the vector used.
Don't worry about the license. What you are doing is not adding to or modifying FreeRTOS, just changing the peripheral used to generate the tick, nothing need be done.
Regards.
RE: PIC32 changing timer?Posted by RĂ©mi Debord on April 25, 2012 We have 4 lines to change:
First, change the Vector,
extern void __attribute__( (interrupt(ipl1), vector(_TIMER_5_VECTOR))) vT1InterruptHandler( void );
Next, change the lines in void prvSetupTimerInterrupt( void ) by these lines (for timer5),
OpenTimer5( ( T5_ON | T5_PS_1_64 | T5_SOURCE_INT ), ulCompareMatch ); ConfigIntTimer5( T5_INT_ON | configKERNEL_INTERRUPT_PRIORITY );
and next modify this line in void vPortIncrementTick( void )
mT5ClearIntFlag();
Enjoy ;)
RE: PIC32 changing timer?Posted by ulmus on April 25, 2012 Thanx remidebord, but as you can see, this post is 6 months old :) I have already everything done and all is still working:)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|