Pages: [1]   Go Down
Author Topic: Lin Support on the Due  (Read 795 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 221
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi folks,

I get in some serious trouble porting the Lin example from the Atmel Framework. Some parts of the Lin example works on the USART0_Handler and the problem is the Handler is allready defined on the variant.cpp.

I try to integrate it without break up parts in the existing files. I can reuse easily the pdc, lin and usart files frome the example and itegrate them in the Arduino IDE, but the Interrupt makes me cry.

Can some one lend me an helping hand for this.

Best regards

Markus
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 221
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi folks,

I get in some serious trouble porting the Lin example from the Atmel Framework. Some parts of the Lin example works on the USART0_Handler and the problem is the Handler is allready defined on the variant.cpp.

I try to integrate it without break up parts in the existing files. I can reuse easily the pdc, lin and usart files frome the example and itegrate them in the Arduino IDE, but the Interrupt makes me cry.

Can some one lend me an helping hand for this.

Best regards

Markus

So folks,

I have ported all nessecary files from the LIN_MNGT_EXAMPLE for the Arduino, I get it so far that it compile without any errors. I will test it on an Lin Master when I get one. One problem left I can't handle the UART0_HANDLER by define them out in the variant.cpp and de/activate him in the sketch. the variant.cpp is handled first by the compiling. Comment it out is not the fine art of doing it. Are there other ways of getting this in the right way.

Next step cleaning the files up.

B.R.

Markus

Btw. I missed functions to enable and dissable the Interrupts in the tc.c
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 221
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe USART0 can become an weak handler so I can override it?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8443
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A weak handler would be a good idea for many system functions I think, or a hook mechanism to call a user's function as they are doing with the SysTick handler.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: