Not applicable
Aug 18, 2013
06:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 18, 2013
06:41 PM
DAVE 3.1.6 has the DAVE 3 User Manual built in. I tried to enter and build this by way of learning a bit more. Because I'm in possession of a Relax Kit, there are some minor differences. Also my DAVE 3 is up-to-date with the latest DAVE 3.1.6 Apps and from what I can tell newer than the example in several cases.
Differences in the set-up were:
100 pin XMC4500 AA step, instead of the example 144 pin device,
LED 2 to be used, i.e. on P1.0 / #79 (example has P3.9/ #12 (for the 144 pin version)
After running the solvers I see some o0ther differences:
The PWMSP001/0 pin_directoutput is on P2.2/#50 (example has P4.3 / #121)
There is an extra AppMOTORLIBS/0 (see attachment)
PWMSP001/0 has an extra signal Timer Concatenation Input, internally connected.
The problem is the compile error:
Description Resource Path Location Type
'CCU41_1_IRQHandler' undeclared (first use in this function) PWMSP001.c /Demo/Dave/Generated/src/PWMSP001 line 257 C/C++ Problem
Following this through, the line in question is (in PWMSP001.c):
Error = PWMSP001_lInit((PWMSP001_HandleType*) &PWMSP001_Handle0);
The handle is defined (PMSP001_Conf.c, line 89):
const PWMSP001_HandleType PWMSP001_Handle0 =
{
...
};
But also as (in NVIC002.h, line 78):
#define PWMSP001_Handle0 IRQ_Hdlr_49 /* User defined function mapped to IRQ_Hdlr_49 */
And IRQ_Hdlr_49 (XMC4500.h, line 254) is defined as:
#define IRQ_Hdlr_49 CCU41_1_IRQHandler
Insert_ExceptionHandler CCU41_1_IRQHandler
Hence compile error - there is no code for CCU41_1_IRQHandler.
However, commenting out the line #define PWMSP001_Handle0 ... in NVIC002.h (line 78) cures the problem.
So, it looks like this file needs fixing. NB the file is version 1.0.16.
Differences in the set-up were:
100 pin XMC4500 AA step, instead of the example 144 pin device,
LED 2 to be used, i.e. on P1.0 / #79 (example has P3.9/ #12 (for the 144 pin version)
After running the solvers I see some o0ther differences:
The PWMSP001/0 pin_directoutput is on P2.2/#50 (example has P4.3 / #121)
There is an extra AppMOTORLIBS/0 (see attachment)
PWMSP001/0 has an extra signal Timer Concatenation Input, internally connected.
The problem is the compile error:
Description Resource Path Location Type
'CCU41_1_IRQHandler' undeclared (first use in this function) PWMSP001.c /Demo/Dave/Generated/src/PWMSP001 line 257 C/C++ Problem
Following this through, the line in question is (in PWMSP001.c):
Error = PWMSP001_lInit((PWMSP001_HandleType*) &PWMSP001_Handle0);
The handle is defined (PMSP001_Conf.c, line 89):
const PWMSP001_HandleType PWMSP001_Handle0 =
{
...
};
But also as (in NVIC002.h, line 78):
#define PWMSP001_Handle0 IRQ_Hdlr_49 /* User defined function mapped to IRQ_Hdlr_49 */
And IRQ_Hdlr_49 (XMC4500.h, line 254) is defined as:
#define IRQ_Hdlr_49 CCU41_1_IRQHandler
Insert_ExceptionHandler CCU41_1_IRQHandler
Hence compile error - there is no code for CCU41_1_IRQHandler.
However, commenting out the line #define PWMSP001_Handle0 ... in NVIC002.h (line 78) cures the problem.
So, it looks like this file needs fixing. NB the file is version 1.0.16.
3 Replies
Aug 18, 2013
09:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 18, 2013
09:35 PM
Hi,
1. Can you upload your example project so that we can investigate further on the compilation error?
2. You can also refer to the example project for the relax kit. (Refer to attached jpg)
1. Can you upload your example project so that we can investigate further on the compilation error?
2. You can also refer to the example project for the relax kit. (Refer to attached jpg)
Not applicable
Aug 19, 2013
12:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 19, 2013
12:39 AM
Hi SharmanJ,
Did you click the 'Generate Code' button before compiling ?
Best regards
Aaron
Did you click the 'Generate Code' button before compiling ?
Best regards
Aaron
Not applicable
Aug 20, 2013
07:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 20, 2013
07:22 PM
Hi
I got this working by changing the following:
[Project set up for 100pin XMC4500, AA step]
Both the output pins (PWMSP001 and IO004) to ensure they can drive the full LED current of 2mA needs to be set up as A1+ Strong Driver, Soft Edge;
Use Port pins P1.0 & P1.1 (i.e. to LED 1 & 2 on Relax Kit);
NVIC002 interrupt handler should be called "PWMSP001_Handler"
In main.c change the name of the interrupt handler from PWM_IRQHandler to CCU40_2_IRQHandler (or very similar - have to follow the #defines through from NVIC002 to XMC4500.h to find out the interrupt handler name)
NVIC002: Enabled interrupt on initialisation, and Timer Mode Settings->Start during initialisation
Observed both LEDs blink, the PWM one being twice as fast as the IO (i.e. interrupt driven) one. So code works, harrah.
I got this working by changing the following:
[Project set up for 100pin XMC4500, AA step]
Both the output pins (PWMSP001 and IO004) to ensure they can drive the full LED current of 2mA needs to be set up as A1+ Strong Driver, Soft Edge;
Use Port pins P1.0 & P1.1 (i.e. to LED 1 & 2 on Relax Kit);
NVIC002 interrupt handler should be called "PWMSP001_Handler"
In main.c change the name of the interrupt handler from PWM_IRQHandler to CCU40_2_IRQHandler (or very similar - have to follow the #defines through from NVIC002 to XMC4500.h to find out the interrupt handler name)
NVIC002: Enabled interrupt on initialisation, and Timer Mode Settings->Start during initialisation
Observed both LEDs blink, the PWM one being twice as fast as the IO (i.e. interrupt driven) one. So code works, harrah.