Interrupt support on PAL module

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Interrupt support on PAL module

Post by Giovanni »

Sounds good, you may post the files on the forum as attachments.

Giovanni
Florian
Posts: 18
Joined: Fri Sep 09, 2011 3:19 pm

Re: Interrupt support on PAL module

Post by Florian »

Attached you find the source and header of the ext LL driver for the SAM7.

Do you have any comments/critics about it?

Regards,
Florian

@edit: Deleted buggy files.
Last edited by Florian on Fri Sep 23, 2011 2:22 pm, edited 2 times in total.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Interrupt support on PAL module

Post by Giovanni »

I will give it a try in the weekend, anyway, a test application should be added.

Giovanni
Florian
Posts: 18
Joined: Fri Sep 09, 2011 3:19 pm

Re: Interrupt support on PAL module

Post by Florian »

I found a few bugs in the interrupt handler and fixed them. So just forget the files above and use this ones please.

Regards,
Florian
Attachments
ext_lld_sam7.zip
(4.02 KiB) Downloaded 468 times
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Interrupt support on PAL module

Post by Giovanni »

Hi Florian.

The implementation looks correct except for some minor issues like the use of // for comments, that is C99 only.

Good idea to make two drivers, one for each port, I would just name them EXTD1 and EXTD2, it is the common naming convention. A simple test application would be useful, you may derive one from the STM32 EXT test application.

Giovanni
tinito
Posts: 112
Joined: Tue Jun 07, 2011 10:32 am
Has thanked: 1 time
Been thanked: 1 time

Re: Interrupt support on PAL module

Post by tinito »

Uh, I did the EXT driver some months ago, it is in some post here on the forum, sorry for seeing this thread too late!
It was not so far by what Giovanni did, that is a good news for me :) (btw, i didn't implement wakeup IRQs)
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Interrupt support on PAL module

Post by Giovanni »

If it is very similar it is because I started from that then made changes (mainly names and few implementation details as you can see). Your driver was mostly correct, conceptually it is the same.

I renamed it to EXT in order to make it less STM32ish :-)

Giovanni
tinito
Posts: 112
Joined: Tue Jun 07, 2011 10:32 am
Has thanked: 1 time
Been thanked: 1 time

Re: Interrupt support on PAL module

Post by tinito »

Happy to read this! And yes, I'm definitively too much STM32-biased ;)
Post Reply