Searching \ for '[PIC] FreeRTOS port to PIC18LF45K22 anyone?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=port
Search entire site for: 'FreeRTOS port to PIC18LF45K22 anyone?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] FreeRTOS port to PIC18LF45K22 anyone?'
2011\07\12@182128 by Robert Berger

flavicon
face
Sorry for cross posting here and also on the FreeRTOS forum, but maybe
here I'll get more responses.

I'm playing with the idea of porting FreeRTOS 7.0.1 to a PIC18LF45K22
with MPLAB and friends as my time permits.

I know that this architecture is suboptimal for a RTOS, but was
wondering if someone has done something similar already or if someone
would be interested in a joint porting effort.

The code will be contributed to the community.
What I've found so far:

*) In the "standard FreeRTOS download": PIC18_MPLAB which targets a
PIC18F452

*) in the community contributions:
interactive.freertos.org/entries/304854-freertos-ported-to-pic18f4520
which targets the PIC18F4520

*) in the community contributions:
http://interactive.freertos.org/entries/271252-freertos which targets
the PIC18F4520 (did not yet investigate what's the difference between
the two)

My understanding is, that for the PIC18LF45K22 at least some more
tweaking for the memory banks is needed.

Please advise.

Regards,

Robert

...."German programmers tend to take it as a personal insult when a fault
is detected in code that they have written." - Debora Weber-Wulff
spam_OUTweberwuTakeThisOuTspamtfh-berlin.de [comp.risks 16.94]

My public pgp key is available at:
pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1

2011\07\12@184652 by Isaac Marino Bavaresco

flavicon
face
What are the unique characteristics of this PIC18LF45K22 that would make
it so different than other PIC18 devices to render the existing port
unusable?

I have already used FreeRTOS for some PIC18 projects and it works fine.
The kernel wastes around 5% of the CPU time @ 10MIPS with 1ms ticks.

Take a look to my piclist.com pages:
<www.piclist.com/Techref/member/IMB-yahoo-J86/index.htm>
There may be something useful there.


Best regards,

Isaac




Em 12/7/2011 19:21, Robert Berger escreveu:
{Quote hidden}

>

2011\07\13@021436 by Robert Berger

flavicon
face

Isaac Marino Bavaresco <isaacbavaresco <at> yahoo.com.br> writes:
>
> What are the unique characteristics of this PIC18LF45K22 that would make
> it so different than other PIC18 devices to render the existing port
> unusable?

Hi Isaac,

Well I was right - here I get a quicker reply that on the FreeRTOS group;)
Please see my comments below.

I have to admit I did not actually play with it yet, but was starting to read
data sheets. (I know a real hacker would just try it).

There is a data sheet PIC18F452 → PIC18F4520 Migration:
ww1.microchip.com/downloads/en/devicedoc/39647a.pdf

From the community ports I can't see any special treatment for this chip
compared to the "offical" FreeRTOS PC18 port.

There is a data sheet PIC18F4520 -> PIC18F45K20 Migration:
ww1.microchip.com/downloads/en/DeviceDoc/41310A.pdf

What worries me a bit is:

The access RAM bank has changed, previously it
was split with the first 128 locations being from bank 0
and the last 128 bytes of bank 15, in the
PIC18F45K20 the access RAM is now split with the
first 96 bytes of bank 0 and the last 160 bytes of bank
15.

This might need a modification.

>
> I have already used FreeRTOS for some PIC18 projects and it works fine.
> The kernel wastes around 5% of the CPU time @ 10MIPS with 1ms ticks.

I'm not at all worried about performance issues, since my board will not do a
lot. I just need to get the serial ports up an running and toggle some I/O Pins
for starters. I just like the concept of using FreeRTOS so I can easily extend
my stuff without.

>
> Take a look to my piclist.com pages:
> <www.piclist.com/Techref/member/IMB-yahoo-J86/index.htm>
> There may be something useful there.

Cool Stuff!!

>
> Best regards,
>
> Isaac

Regards,

Robert

{Quote hidden}

2011\07\13@032508 by Michael Watterson

face picon face
On 12/07/2011 23:46, Isaac Marino Bavaresco wrote:
> What are the unique characteristics of this PIC18LF45K22 that would make
> it so different than other PIC18 devices to render the existing port
> unusable?
>
> I have already used FreeRTOS for some PIC18 projects and it works fine.
> The kernel wastes around 5% of the CPU time @ 10MIPS with 1ms ticks.
>
> Take a look to my piclist.com pages:
> <www.piclist.com/Techref/member/IMB-yahoo-J86/index.htm>
> There may be something useful there.
>
>

I agree. If it meets your needs on any 18F, it should be OK on every 18F. Assuming enough RAM and Flash for entire application.

I was very interested in FreeRTOS, but decided to go a different route.

2011\07\13@082128 by Isaac Marino Bavaresco

flavicon
face
Em 13/7/2011 03:14, Robert Berger escreveu:

> From the community ports I can't see any special treatment for this chip
> compared to the "offical" FreeRTOS PC18 port.


And it should not be necessary.


{Quote hidden}

Don't worry, you probably won't need access RAM at all.

I suggest that you use the extended instruction set, it is much more
efficient for programming in C. In this mode there is no access bank at
all, all instructions that would access the access bank actually access
the stack frame.


> This might need a modification.


FreeRTOS doesn't use access bank itself.

Check my pages, there is a bug in the implementation of FreeRTOS's C18
port with some versions of the MPLAB C18 compiler.


Best regards,

Isaac



{Quote hidden}

>

2011\07\13@082753 by Isaac Marino Bavaresco

flavicon
face
Em 13/7/2011 04:26, Michael Watterson escreveu:
> Resent with TAG
>
> On 12/07/2011 22:38, Robert Berger wrote:
>> I'm playing with the idea of porting FreeRTOS 7.0.1 to a PIC18LF45K22
>> with MPLAB and friends as my time permits.
>>
>> I know that this architecture is suboptimal for a RTOS, but was
>> wondering if someone has done something similar already or if someone
>> would be interested in a joint porting effort.
>>
> Very sub-optimal. I looked at this. The 16F/18F is not the the right
> family for such a project.


Indeed it works very well. It depends on your tick rate. I think that
around 5% of CPU time consumption for 1ms ticks at 10MIPS is good enough.

I created several PIC18 projects with FreeRTOS, some very real-time
intensive and all them worked perfectly.


> I think someone did "sort of" get it on an 18F.
>
> [EDIT: I see it is now working on 18F, good]


For several years now :)


> What you need is a simpler scheme using timer interrupt and all the
> tasks called in turn via semaphores and the main program loop. My
> approach works for 10F/12F/16F and 18F. It's not an actual OS, but a
> simple framework.


This sort of stuff is good also. I use something similar a lot too.

Note: FreeRTOS offers co-routines also.


{Quote hidden}

> frames and manipulate SP and Stack is the problem.

2011\07\13@083200 by Isaac Marino Bavaresco

flavicon
face

Forgot to mention, V G (formerly Solarwind) published a good
project/tutorial for using FreeRTOS with PIC18:

<http://solar-blogg.blogspot.com/search/label/PIC18>


Best regards,

Isaac



Em 13/7/2011 03:14, Robert Berger escreveu:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...