Aug 19, 2016
07:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 19, 2016
07:50 AM
Hi.
I've problems with a interrupt.
I have add 3 interrupts in a project and the xmc controller is running in the Default_Handler.
Interrupt0 is configured with dave to a timer and is working with a user service handler (event_time_intervall is calling Timetick_Handler() ).
Interrupt1 is configured with dave to a CAN-RX interrupt and is not working with a user service handler (event_lmo_01_rxinp should calling USR_CAN_RX_Handler() ).
Interrupt2 is configured with dave to a CAN-TX interrupt (event_lmo_02_txinp should calling USR_CAN_TX_Handler() ).
Timetick_Handler() is called every 500ms.
If a CAN-Message is received, it seems a interrupt is called.
the debugger says: "No source available for "() at 0xfffffff9" "
and the controller is looped in the Default_Handler: SysTick_Handler at 10001098.
The irq should call my USR_CAN_RX_Handler().
The HW-Signal Connector is done for all Interrupt.
A Look at Adress 0xE000ED04 shows: 0x011, that meens: 0x11 - 16 = IRQ1 as irq source.
That's my designated Interrupt1 correct?.
What can the problem be?
Thanks for help.
I've problems with a interrupt.
I have add 3 interrupts in a project and the xmc controller is running in the Default_Handler.
Interrupt0 is configured with dave to a timer and is working with a user service handler (event_time_intervall is calling Timetick_Handler() ).
Interrupt1 is configured with dave to a CAN-RX interrupt and is not working with a user service handler (event_lmo_01_rxinp should calling USR_CAN_RX_Handler() ).
Interrupt2 is configured with dave to a CAN-TX interrupt (event_lmo_02_txinp should calling USR_CAN_TX_Handler() ).
Timetick_Handler() is called every 500ms.
If a CAN-Message is received, it seems a interrupt is called.
the debugger says: "No source available for "
and the controller is looped in the Default_Handler: SysTick_Handler at 10001098.
The irq should call my USR_CAN_RX_Handler().
The HW-Signal Connector is done for all Interrupt.
A Look at Adress 0xE000ED04 shows: 0x011, that meens: 0x11 - 16 = IRQ1 as irq source.
That's my designated Interrupt1 correct?.
What can the problem be?
Thanks for help.
- Tags:
- IFX
5 Replies
Aug 19, 2016
08:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 19, 2016
08:18 AM
Hi,
can you please tell me which board are you using? I saw that you mentioned in some other post that you´re doing a project for XMC1302 and while that microcontroller does not have CAN module, I guess you´re using different board.
Best regards,
Deni
can you please tell me which board are you using? I saw that you mentioned in some other post that you´re doing a project for XMC1302 and while that microcontroller does not have CAN module, I guess you´re using different board.
Best regards,
Deni
Aug 21, 2016
10:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 21, 2016
10:41 PM
Hi Deni.
I'm using a XMC1404 Boot-Kit Board (64-Pin Device).
The Baud-Rate is correct (250k) and if i start a CAN_NODE_MO_Transmit() in the Timer_Handler, the controller sends one CAN-Message (but only one time..).
So the baud rate is correct and the Controller can receive.
For the receive test, i didn't send a frame, only wait for receiving a frame..
If i place a dummy in my Main.c:
extern void SysTick_Handler(void)
{
}
the controller now hangs at the same adress (0x10001098) but now in SVC_Handler..
Here are the configuration:



I'm using a XMC1404 Boot-Kit Board (64-Pin Device).
The Baud-Rate is correct (250k) and if i start a CAN_NODE_MO_Transmit() in the Timer_Handler, the controller sends one CAN-Message (but only one time..).
So the baud rate is correct and the Controller can receive.
For the receive test, i didn't send a frame, only wait for receiving a frame..
If i place a dummy in my Main.c:
extern void SysTick_Handler(void)
{
}
the controller now hangs at the same adress (0x10001098) but now in SVC_Handler..
Here are the configuration:
Aug 22, 2016
12:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 22, 2016
12:29 AM
Hi.
Amazing things are happend.
It is incomprehensible to me....
If i put the CAN-Rx Interrupt Handler in a separate C-File
the controller hangs.
If i put the same function with the same name in the main.c (with copy and paste), the interrupt handler is called!
If i place the function in my can_user.c file, it is a normal function: void USR_CAN_RX_Handler(void)
If i place the function in my main.c file, it is a IRQ1_Handler(void) -> amazing....
The definition is:
XMC1400.h: #define IRQ_Hdlr_1 IRQ1_Handler
interrupt_extern.h: #define USR_CAN_RX_Handler IRQ_Hdlr_1
Now: what is the magic differed for the compiler, to compile the function as irq-handler in main.c and compile the same function as normal void function in a other c-file???
Can i set a magic property to a c-file, so the compiler knows, the the interrupt handler is realy realy a interrupt handler, or have i to place all my interrupt handler in main.c?
Thanks for helpful comments.
Amazing things are happend.
It is incomprehensible to me....
If i put the CAN-Rx Interrupt Handler in a separate C-File
the controller hangs.
If i put the same function with the same name in the main.c (with copy and paste), the interrupt handler is called!
If i place the function in my can_user.c file, it is a normal function: void USR_CAN_RX_Handler(void)
If i place the function in my main.c file, it is a IRQ1_Handler(void) -> amazing....
The definition is:
XMC1400.h: #define IRQ_Hdlr_1 IRQ1_Handler
interrupt_extern.h: #define USR_CAN_RX_Handler IRQ_Hdlr_1
Now: what is the magic differed for the compiler, to compile the function as irq-handler in main.c and compile the same function as normal void function in a other c-file???
Can i set a magic property to a c-file, so the compiler knows, the the interrupt handler is realy realy a interrupt handler, or have i to place all my interrupt handler in main.c?
Thanks for helpful comments.
Aug 22, 2016
01:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 22, 2016
01:09 AM
Hi to all.
For all with the same problem.
If you:
#include
your interrupt handler will be working 🙂
For all with the same problem.
If you:
#include
your interrupt handler will be working 🙂
Aug 22, 2016
01:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 22, 2016
01:18 AM
Hi xmcuser17,
if I understood correctly, you have successfully solved your issue?
And also regarding this #include. This include should be already there if you make a new project and select DAVE CE (kind of projects that are used for DAVE APPs).
Regards,
Deni
if I understood correctly, you have successfully solved your issue?
And also regarding this #include
Regards,
Deni