xmc4000 peripherial driver lib

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi,

looking for xmc4000 peripheral driver lib, I have found information (http://www.infineonforums.com/archive/index.php/t-490.html?) that there are plans for realising such library in the first quarter of the 2015. I wonder if it is true, because I start now project on XMC4500 and I need to know if I have to prepare such library for my own? Unfortunately Dave apps does not support all ccu4 modes of operation. I need 64bit free running counter with atomic read for time stamping purposes and support for 64bit output compare for delayed event generation. So far I have found only counting and pwm apps.

Best regards,
Mariusz
0 Likes
15 Replies
Not applicable
Hi Mariusz,

I believe you are aware that XMC Peripheral Library (XMC Lib) is online. You may want to use CCUx LLD to build your own library since the timer concatenation is not support in the available PWM Apps.

Best regards.
Sophia
0 Likes
Not applicable
Hi Sophia,

yes I am aware, I have post this question just before you have released DAVE4 with XMC lib. Besides, unfortunately, I come to the conclusion that CCU4/8 units haven't been designed to applications I have described previously.

Best regards,
Mariusz
0 Likes
Not applicable
Hi Mariusz,

I apologize that I have overlooked this post which requires moderator's approval before it becomes visible.
As for the application you required, I will check with my colleague and get back to you later.

Best regards,
Sophia
0 Likes
Not applicable
Sophia

is the doxygen doc available for XMC Lib ?
0 Likes
Not applicable
mjaniak wrote:
Hi Sophia,

yes I am aware, I have post this question just before you have released DAVE4 with XMC lib. Besides, unfortunately, I come to the conclusion that CCU4/8 units haven't been designed to applications I have described previously.

Best regards,
Mariusz


You need to enable all the time slices for your application. As for the atomic read, you can use global start control bits (CCUCON.GSCxx) to trigger SW capture event then read the capture register values (eg.CC8yCxV.CAPTV).

Best regards,
Sophia
0 Likes
Not applicable
Heinz wrote:
Sophia

is the doxygen doc available for XMC Lib ?


The HTML format help files are available in "XMC_Peripheral_Library_v1.0.0.zip".

Best regards,
Sophia
0 Likes
Not applicable
sophia wrote:
You need to enable all the time slices for your application. As for the atomic read, you can use global start control bits (CCUCON.GSCxx) to trigger SW capture event then read the capture register values (eg.CC8yCxV.CAPTV).

Best regards,
Sophia


Thank you Sophia, I have already come to similar conclusions

http://www.infineonforums.com/threads/2847-CCU8-SW-capture

This problem is not so important. The real problem is with the compare functionality that I need to generate delayed events relative to actual time. The CCU has compare CRy registers that can't be set directly. To set CRy register user has to write to the shadow registers SCRy and wait for the shadow transfer (on period march or on one match) to copy from SCRy to CRy. This is unacceptable, because event may be located before period/one match. Moreover in concatenated mode shadow transfer in LSB doesn't trigger transfer in MSB what does not make sense

http://www.infineonforums.com/threads/2853-CCU8-shadow-transfer-and-timer-concatenation

I can't say that CCU slice support full concatenation, eg. to start concatenated timers I have to issue start separately for each slice (TCSET) or use external event that has been already reserved for capture purpose.

Furthermore timer value can't be set immediate on user request what I have discussed here

http://www.infineonforums.com/threads/2863-CCU8-Updating-timer-value-on-the-fly

All together this does not look so promising.

Regards,
Mariusz
0 Likes
Not applicable
Thanks,
I originally did only download DAVE 4.0.
It contains the XMC Lib, but not the documentation.
It is worth adding it and also a link from the "Help->Help Contents" menue
0 Likes
Not applicable
Hi Heinz-Jürgen,

It is available in DAVE. Pls go to: >Help>Help Contents>DAVE Apps>XMC1[1.0.0]/XMC4[1.0.0].

Best regards,
Sophia
0 Likes
Not applicable
sophia wrote:
Hi Heinz-Jürgen,

It is available in DAVE. Pls go to: >Help>Help Contents>DAVE Apps>XMC1[1.0.0]/XMC4[1.0.0].

Best regards,
Sophia


I did not expect it under DAVE Apps, because the XMC Lib is aisd to work without DAVE Apps.
But Thanks for pointing to it.
You shoud think about placing the link one section level higher.
0 Likes
Not applicable
sophia wrote:
Hi Heinz-Jürgen,

It is available in DAVE. Pls go to: >Help>Help Contents>DAVE Apps>XMC1[1.0.0]/XMC4[1.0.0].

Best regards,
Sophia


I did not expect it under DAVE Apps, because the XMC Lib is aisd to work without DAVE Apps.
But Thanks for pointing to it.
You shoud think about placing the link one section level higher.
0 Likes
Not applicable
Hi,

Thank you very much for the feedback. I will help to forward further.

Best regards,
Sophia
0 Likes
User9897
Level 2
Level 2
Hi,

I trying to use the XMC Lib with Dave 3, but I had no success so far. Is it even possible?
I followed the instructions in Readme.txt but when I make a build i get the following error:

"C:\Program Files (x86)\Dave3\ARM-GCC\bin\make" all 
'Building file: ../XMClib/src/xmc1_eru.c'
'Invoking: ARM-GCC C Compiler'
"C:\Program Files (x86)\Dave3\ARM-GCC/bin/arm-none-eabi-gcc" -DXMC4500_F100x1024 -DUC_ID=4503003 -I"C:\Program Files (x86)\Dave3\eclipse\/../CMSIS/Include" -I"C:\Program Files (x86)\Dave3\eclipse\/../CMSIS/Infineon/Include" -I"C:\Program Files (x86)\Dave3\ARM-GCC/arm-none-eabi/include" -I"C:\Program Files (x86)\Dave3\eclipse\/../emWin/Start/GUI/inc" -I"C:\Program Files (x86)\Dave3\eclipse\/../CMSIS/Infineon/XMC4500_series/Include" -I"D:\Anwendungsdaten\Dave\asd" -I"D:\Anwendungsdaten\Dave\asd\CMSIS\Include" -O0 -ffunction-sections -Wall -std=gnu99 -mfloat-abi=softfp -Wa,-adhlns="XMClib/src/xmc1_eru.o.lst" -c -fmessage-length=0 -MMD -MP -MF"XMClib/src/xmc1_eru.d" -MT"XMClib/src/xmc1_eru.d XMClib/src/xmc1_eru.o" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g3 -gdwarf-2 -o "XMClib/src/xmc1_eru.o" "../XMClib/src/xmc1_eru.c"
../XMClib/src/xmc1_eru.c:26:21: fatal error: xmc_eru.h: No such file or directory
compilation terminated.
make: *** [XMClib/src/xmc1_eru.o] Error 1


Any idea what is wrong?

edit:

Ok I played a bit with the include paths and now the error is gone. But now I get a new error:
'Building file: ../XMClib/src/xmc4_scu.c'
'Invoking: ARM-GCC C Compiler'
"C:\Program Files (x86)\Dave3\ARM-GCC/bin/arm-none-eabi-gcc" -DXMC4500_F100x1024 -DUC_ID=4503003 -I"C:\Program Files (x86)\Dave3\eclipse\/../CMSIS/Include" -I"C:\Program Files (x86)\Dave3\eclipse\/../CMSIS/Infineon/Include" -I"C:\Program Files (x86)\Dave3\ARM-GCC/arm-none-eabi/include" -I"C:\Program Files (x86)\Dave3\eclipse\/../emWin/Start/GUI/inc" -I"C:\Program Files (x86)\Dave3\eclipse\/../CMSIS/Infineon/XMC4500_series/Include" -I"../asd/XMCLib/inc" -I"../asd" -I"../asd/CMSIS/Include" -I"../asd/CMSIS/Infineon/XMC450_series/Include" -I"D:\Anwendungsdaten\Dave\asd\XMClib\inc" -I"D:\Anwendungsdaten\Dave\asd\CMSIS\Include" -I"D:\Anwendungsdaten\Dave\asd\CMSIS\Infineon\XMC4500_series\Include" -I"D:\Anwendungsdaten\Dave\asd" -O0 -ffunction-sections -Wall -std=gnu99 -mfloat-abi=softfp -Wa,-adhlns="XMClib/src/xmc4_scu.o.lst" -c -fmessage-length=0 -MMD -MP -MF"XMClib/src/xmc4_scu.d" -MT"XMClib/src/xmc4_scu.d XMClib/src/xmc4_scu.o" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g3 -gdwarf-2 -o "XMClib/src/xmc4_scu.o" "../XMClib/src/xmc4_scu.c"
../XMClib/src/xmc4_scu.c: In function 'XMC_SCU_CLOCK_GetSystemPllClockSourceFrequency':
../XMClib/src/xmc4_scu.c:602:5: warning: implicit declaration of function 'OSCHP_GetFrequency' [-Wimplicit-function-declaration]
../XMClib/src/xmc4_scu.c:606:23: error: 'OFI_FREQUENCY' undeclared (first use in this function)
../XMClib/src/xmc4_scu.c:606:23: note: each undeclared identifier is reported only once for each function it appears in
../XMClib/src/xmc4_scu.c: In function 'XMC_SCU_CLOCK_GetWdtClockFrequency':
../XMClib/src/xmc4_scu.c:694:17: error: 'OFI_FREQUENCY' undeclared (first use in this function)
../XMClib/src/xmc4_scu.c:698:17: error: 'OSI_FREQUENCY' undeclared (first use in this function)
../XMClib/src/xmc4_scu.c: In function 'XMC_SCU_CLOCK_StartSystemPll':
../XMClib/src/xmc4_scu.c:1181:30: error: 'OFI_FREQUENCY' undeclared (first use in this function)
make: *** [XMClib/src/xmc4_scu.o] Error 1

Best regards,
Frank
0 Likes
Not applicable
Hi Frank,

XMC Lib is designed for DAVE v4.

Best regards,
Sophia
0 Likes
User9897
Level 2
Level 2
Ok, thank you.
0 Likes