Go Down

Topic: Lin Support on the Due (Read 1 time) previous topic - next topic

Markus_L811

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

Markus_L811


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

Markus_L811

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

Graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

Go Up