Home     Company     Products     Services     Community     Download     Store
    [Home arrow Community arrow Forum ]
Community
Community
Login Form





Lost Password?
No account yet? Register
Evidence Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:UART interrupt mode (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: Re:UART interrupt mode
#301
desmomito (User)
Junior Boarder
Posts: 27
graphgraph
User Offline Click here to see the profile of this user
Re:UART interrupt mode 1 Month, 3 Weeks ago Karma: 0  
Thank you. I'd like to know if in the Erika code I can use the normal microchip code. For example to initialize a peripheral and for example the classic method to use interrupt which is :

void __attribute__((__interrupt__)) _PERIPHERALInterrupt( void ){
...code
}

I mean if I initialize a peripheral with interrupt it's gonna be the above code that will be called or the Erika catch the interrupt and manage it in a different way ?


Thank you in advance,
Pasquale.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#302
chris (Moderator)
Moderator
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Re:UART interrupt mode 1 Month, 3 Weeks ago Karma: 0  
The answer is yes.
Erika shall not catch any kind of interrupts at all, unless you want erika to do it.
Be aware that with this solution you will not use properly the erika kernel, since the erika interrupt handling has been done to have coherency in the task scheduling mechanism.
To tell the kernel that you want to use an interrupt service routine you should use the ISR2() or ISR1(), look at the erika refman for further details.

The syntax for the same example you mentioned before is:

Code: :

ISR2(_PERIPHERALInterrupt) {         /* Interrupt body! */         code ..... }

 
Report to moderator   Logged Logged  
 
Last Edit: 2008/11/13 19:33 By chris.
  The administrator has disabled public write access.
#303
paolo.gai (Admin)
Admin
Posts: 116
graph
User Offline Click here to see the profile of this user
Re:UART interrupt mode 1 Month, 3 Weeks ago Karma: 4  
Exact. ERIKA does not touch any interrupt unless you want to. All the Microchip code can be used with the Kernel. in that case, the ISR will be called "ISR Type 1", whereas "ISR Type 2" are the ISR handled by the kernel.

The EE Manuals each contain a table with the list of functions and in which context they they can be called.

PJ
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Evidence S.r.l. - PIVA: 01638690501
Via Carducci 64/A - Ghezzano - Pisa - Italy
Privacy Policy