DAVE™ Forum Discussions
DAVE™
I am experimenting with the PWM apps and have found a rounding problem with floats when viewed in the Tasking debugger.My main function sits in a loop...
Show More
I am experimenting with the PWM apps and have found a rounding problem with floats when viewed in the Tasking debugger.
My main function sits in a loop adding 0.1 to the float 'DutyCycle' but the value shown in the Variables tab of the Tasking debugger shows rounding errors. The value is not a multiple of 0.1.
Here is the 'DutyCycle' value after it has been initialised to 0.0. The simple main function can also be seen.
Here is the 'DutyCycle' value after 4.6 seconds. The error is -ve
Here is the 'DutyCycle' value after 15.1 seconds. This time the error is +ve.
Here is the 'DutyCycle' value when it is greater than 100
Is the rounding error just in the debugger or in the compiled code too ?
Thank you in advance
Best regards
Aaron Show Less
My main function sits in a loop adding 0.1 to the float 'DutyCycle' but the value shown in the Variables tab of the Tasking debugger shows rounding errors. The value is not a multiple of 0.1.
Here is the 'DutyCycle' value after it has been initialised to 0.0. The simple main function can also be seen.
Here is the 'DutyCycle' value after 4.6 seconds. The error is -ve
Here is the 'DutyCycle' value after 15.1 seconds. This time the error is +ve.
Here is the 'DutyCycle' value when it is greater than 100
Is the rounding error just in the debugger or in the compiled code too ?
Thank you in advance
Best regards
Aaron Show Less
DAVE™
Hi,and' can start the debugger without kit with Infineon ARM Simulator Debugger if I do this, it remains in the loop the following code (CLPK002 App)....
Show More
Hi,
and' can start the debugger without kit with Infineon ARM Simulator Debugger if I do this, it remains in the loop the following code (CLPK002 App).
while (SCU_CLK->CLKCR&(SCU_CLK_CLKCR_VDDC2LOW_Msk))
{
;
}
This because it lacks the hardware clock but this can be simulated?
Many thanks and regards. Show Less
and' can start the debugger without kit with Infineon ARM Simulator Debugger if I do this, it remains in the loop the following code (CLPK002 App).
while (SCU_CLK->CLKCR&(SCU_CLK_CLKCR_VDDC2LOW_Msk))
{
;
}
This because it lacks the hardware clock but this can be simulated?
Many thanks and regards. Show Less
DAVE™
Is there any apps example (accept running led) for XMC1300 boot kit?
DAVE™
I have been struggling with mouse.After several months of development in Dave, the mouse handling suddenly failed.When I click in source window, I can...
Show More
I have been struggling with mouse.
After several months of development in Dave, the mouse handling suddenly failed.
When I click in source window, I can do basic editing, but the BACKSPACE key fails to work. (It works fine in other apps, such as this one)
Once I click in the text editor window, I can no longer click on tabs or buttons, such as other source tabs or the Debug button.
If I move the mouse to any other application and click, I can return to Dave and click on the above items. But clicking back in the text editor window causes the same failure condition.
If I get into the debugger, I cannot set breakpoints reliably.
It looks like the mouse handling code is getting confused. I suspect the java system. (Using standard, as shipped).
I tried the obvious: Install/Repair. No change.
I am stuck and have a Monday deadline. Any help is appreciated. Show Less
After several months of development in Dave, the mouse handling suddenly failed.
When I click in source window, I can do basic editing, but the BACKSPACE key fails to work. (It works fine in other apps, such as this one)
Once I click in the text editor window, I can no longer click on tabs or buttons, such as other source tabs or the Debug button.
If I move the mouse to any other application and click, I can return to Dave and click on the above items. But clicking back in the text editor window causes the same failure condition.
If I get into the debugger, I cannot set breakpoints reliably.
It looks like the mouse handling code is getting confused. I suspect the java system. (Using standard, as shipped).
I tried the obvious: Install/Repair. No change.
I am stuck and have a Monday deadline. Any help is appreciated. Show Less
DAVE™
I need to create an analog output signal with DAVE app. Is this possible? I tried it with a IO001 but there I just have functions to read a signal (an...
Show More
I need to create an analog output signal with DAVE app. Is this possible? I tried it with a IO001 but there I just have functions to read a signal (analog_read) and not to create a signal on an output pin.
Thanks for helping in advance
Manuel Show Less
Thanks for helping in advance
Manuel Show Less
DAVE™
Hi All - my first post in the forum - I doubt it'll be my last. 🙂I've just got myself an Infineon Relax board and I'm working through the DAVE tutori...
Show More
Hi All - my first post in the forum - I doubt it'll be my last. 🙂
I've just got myself an Infineon Relax board and I'm working through the DAVE tutorials for this board, using Dave 3.1.6. Got through part 1 OK - LED is flashing. Next I try part 2 and, whilst it seems to run (LED is still flashing) and I can set a breakpoint in the "main" function. So far so good.
However, the suggestion in the tutorial to set a breakpoint in the ISR function PWSP001_CompareMatchIntr doesn't work. I set the breakpoint and it's never reached. If I press the pause button, the code is always in the startup_XMC4500.s file at a line that reads:
Insert_ExceptionHandler CCU40_2_IRQHandler
So I'm not sure if this has actually worked or not.
Can anyone tell me if this is working correctly and, if so, why it doesn't stop in the interrupt function?
Also, is there somewhere I can download the tutorials as complete projects anywhere? All I currently have are the 3 PDFs.
Thanks.
Tim Curtis Show Less
I've just got myself an Infineon Relax board and I'm working through the DAVE tutorials for this board, using Dave 3.1.6. Got through part 1 OK - LED is flashing. Next I try part 2 and, whilst it seems to run (LED is still flashing) and I can set a breakpoint in the "main" function. So far so good.
However, the suggestion in the tutorial to set a breakpoint in the ISR function PWSP001_CompareMatchIntr doesn't work. I set the breakpoint and it's never reached. If I press the pause button, the code is always in the startup_XMC4500.s file at a line that reads:
Insert_ExceptionHandler CCU40_2_IRQHandler
So I'm not sure if this has actually worked or not.
Can anyone tell me if this is working correctly and, if so, why it doesn't stop in the interrupt function?
Also, is there somewhere I can download the tutorials as complete projects anywhere? All I currently have are the 3 PDFs.
Thanks.
Tim Curtis Show Less
DAVE™
HelloI don't find the settings in the SPI001 app (xmc1100) for multiple Chip Selects. Where could I find it and how do I select at Transmission?Since ...
Show More
Hello
I don't find the settings in the SPI001 app (xmc1100) for multiple Chip Selects. Where could I find it and how do I select at Transmission?
Since I could select ChipSelectA I though I don't need to do it by hand.
lg Show Less
I don't find the settings in the SPI001 app (xmc1100) for multiple Chip Selects. Where could I find it and how do I select at Transmission?
Since I could select ChipSelectA I though I don't need to do it by hand.
lg Show Less
DAVE™
Both DAVE Forum and Problem Tracking systems allow 20MB of file size to be uploaded.However, sometimes the upload fails especially when you try to upl...
Show More
Both DAVE Forum and Problem Tracking systems allow 20MB of file size to be uploaded.
However, sometimes the upload fails especially when you try to upload a zipped DAVE project inside the company fireware. Perhaps due to security reason, the system does not accept certain contents inside the zip file.
In this case, pls double zip the project file (zip 2 times/zip the zip file).
In addition, you could remove the "Debug" folder from the project folder to further reduce the file size. Show Less
However, sometimes the upload fails especially when you try to upload a zipped DAVE project inside the company fireware. Perhaps due to security reason, the system does not accept certain contents inside the zip file.
In this case, pls double zip the project file (zip 2 times/zip the zip file).
In addition, you could remove the "Debug" folder from the project folder to further reduce the file size. Show Less
DAVE™
In this case I'm already using Eclipse for various projects and have Java, C++, GNU compilers, GDB and many other items (plug-ins) installed. Eclipse...
Show More
In this case I'm already using Eclipse for various projects and have Java, C++, GNU compilers, GDB and many other items (plug-ins) installed. Eclipse version is "Juno Service Release 2".
My concern is DAVE (3.1.6) will stamp all over the current set up or be incompatible.
Regards Jack Show Less
My concern is DAVE (3.1.6) will stamp all over the current set up or be incompatible.
Regards Jack Show Less
DAVE™
Hi All,There is a combination of parameters in the CANGLOBAL 1.0.6 and CAN001 1.0.6 GUIs that lead to the wrong baud rate being generated for the CAN ...
Show More
Hi All,
There is a combination of parameters in the CANGLOBAL 1.0.6 and CAN001 1.0.6 GUIs that lead to the wrong baud rate being generated for the CAN Peripheral.
To reproduce on the latest DAVE3 and apps and chip definitions as of today 7Aug2013:
Create a new DAVE CE Project with XMC4500-F144x1024 as the target device
In the App Selection view, double click on CAN001 [1.0.6]
In the S/W App Connectivity View, Double click on CANGLOBAL/0 to bring up the CANGLOBAL/0 GUI. Enter the following parameters:
In the S/W App Connectivity View, Double click on CAN001/0 to bring up the CANGLOBAL GUI. Enter the following parameters:
We leave the CLK001/0 App GUI set at the default System Frequency of 120MHz.
Now generate code. Note that we have selected 60MHz CAN peripheral clock in the CANGLOBAL GUI.
Look at the code generated for Dave/Generated/src/CANGLOBAL/CANGLOBAL.c
Note that CAN_FDR.STEP is being loaded with 1023. We are using normal divider mode According to eqn. 18.1 in the XMC4500 reference manual:
This means that fcan becomes fpb * (1/(1024-1023)), which is just 1 * fpb. This gives fcan = 120MHz even though we asked for 60MHz.
Correct code generation should give CAN_FDR.STEP = 1022, so that fcan = fpb*(1/(1024/1022)) = fpb/2 = 60MHz.
I have verified this CAN bit timing on the oscilliscope, and I can clearly see the 2MB/s timing for FDR.STEP=1023 and
1MB/s timing for FDR.STEP=1022.
Here is a copy of the DAVE3 project showing this bug: Show Less
There is a combination of parameters in the CANGLOBAL 1.0.6 and CAN001 1.0.6 GUIs that lead to the wrong baud rate being generated for the CAN Peripheral.
To reproduce on the latest DAVE3 and apps and chip definitions as of today 7Aug2013:
Create a new DAVE CE Project with XMC4500-F144x1024 as the target device
In the App Selection view, double click on CAN001 [1.0.6]
In the S/W App Connectivity View, Double click on CANGLOBAL/0 to bring up the CANGLOBAL/0 GUI. Enter the following parameters:
In the S/W App Connectivity View, Double click on CAN001/0 to bring up the CANGLOBAL GUI. Enter the following parameters:
We leave the CLK001/0 App GUI set at the default System Frequency of 120MHz.
Now generate code. Note that we have selected 60MHz CAN peripheral clock in the CANGLOBAL GUI.
Look at the code generated for Dave/Generated/src/CANGLOBAL/CANGLOBAL.c
/* Function to Initialize CAN Clock registers
*/
void CANGLOBAL_Init(void)
{
static uint8_t isInitialized = 0U;
if(isInitialized == 0U)
{
/* Reset MultiCAN module */
RESET001_DeassertReset(PER1_MCAN0);
/* Enable CAN Module */
CAN->CLC &= (uint32_t)~CAN_CLC_DISR_Msk;
/* Select the Divider Mode */
while((CAN->CLC & CAN_CLC_DISS_Msk))
{}
CAN->FDR |= 1U </* Configure step value */
CAN->FDR |= 1023U << CAN_FDR_STEP_Pos;
isInitialized++;
}
}
Note that CAN_FDR.STEP is being loaded with 1023. We are using normal divider mode According to eqn. 18.1 in the XMC4500 reference manual:
This means that fcan becomes fpb * (1/(1024-1023)), which is just 1 * fpb. This gives fcan = 120MHz even though we asked for 60MHz.
Correct code generation should give CAN_FDR.STEP = 1022, so that fcan = fpb*(1/(1024/1022)) = fpb/2 = 60MHz.
I have verified this CAN bit timing on the oscilliscope, and I can clearly see the 2MB/s timing for FDR.STEP=1023 and
1MB/s timing for FDR.STEP=1022.
Here is a copy of the DAVE3 project showing this bug: Show Less