XMC™ Forum Discussions
text.format{('custom.tabs.no.results')}
Sort by:
XMC™
I'm trying to figure out a clock issue we're having. The register I want to read is ANAOSCHPCTRL (analog oscillator high precision control).Two issues...
Show More
I'm trying to figure out a clock issue we're having. The register I want to read is ANAOSCHPCTRL (analog oscillator high precision control).
Two issues, seemingly related.
1. When I use the register viewer in Keil, I see all the registers as options using the pull down to select a register. Some registers in that viewer window work well (CANNode, SCU_Clock, etc). Some peripherals show registers and locations, but no values, just always show zero value.
I can manually read or write the values in code, so the headers are correct. I cannot read or set them using Keil's register window.
The base address for SCU 0x4001'0000, I can see SCU_CLOCK registers in the peripheral register window at 0x4001'0314 and the values of it, but no values for 0x4000'1090 SCU_ANALOG for example.
2. The MEMORY VIEWER window in Keil will not show anything in the 0x4000'0000 range. Instead of zeros or 0xFF or proper values I see "??" for each byte. I think these problems are related. Other memory access like 0x1000'0000 works.
It's very difficult to debug without register values. I'm trying to figure out who is at fault here. Infineon or Keil. I'm guessing the XML-like config files defined for Keil are incorrect.
Show Less
Two issues, seemingly related.
1. When I use the register viewer in Keil, I see all the registers as options using the pull down to select a register. Some registers in that viewer window work well (CANNode, SCU_Clock, etc). Some peripherals show registers and locations, but no values, just always show zero value.
I can manually read or write the values in code, so the headers are correct. I cannot read or set them using Keil's register window.
The base address for SCU 0x4001'0000, I can see SCU_CLOCK registers in the peripheral register window at 0x4001'0314 and the values of it, but no values for 0x4000'1090 SCU_ANALOG for example.
2. The MEMORY VIEWER window in Keil will not show anything in the 0x4000'0000 range. Instead of zeros or 0xFF or proper values I see "??" for each byte. I think these problems are related. Other memory access like 0x1000'0000 works.
It's very difficult to debug without register values. I'm trying to figure out who is at fault here. Infineon or Keil. I'm guessing the XML-like config files defined for Keil are incorrect.
Show Less
XMC™
Hello!I guess a lot of people wrote their own bootloaders for the XMC4x00. Attached you'll find a DAVE 4 project of an UART bootloader which parses In...
Show More
Hello!
I guess a lot of people wrote their own bootloaders for the XMC4x00. Attached you'll find a DAVE 4 project of an UART bootloader which parses Intel .HEX files and transfers it to the application flash.
specs:
- no DAVE CE, just plain code
- parses Intel .hex file and flashes it to application flash
- for XMC4300, but will also run on XMC4800 with small changes (already ran it there)
- supports custom .hex record with checksum (optional)
- UART on P0.0 (RX) and P0.1 (TX), USIC 1, ch. 1
- baudrates supported from 115200 to 1200000 baud
- incoming data is buffered into RAM during flash operation to allow sending the .hex file in burst mode
- can be controlled by simple terminal program, if UART-to-USB chip is used (FTDI/Microchip and others provide those chips)
- bootloader is triggered by pin 15.3: high -> bootloader, low -> application (if it exists)
- bootloader requires application to include ABM 1 header
- optional bootloader-to-application bridge may be integrated into application to call specific PCB initialization code when switching to bootloader
The code is documented (please read header file comments first). If you find bugs or have questions/recommendations, please reply here.
Make sure to relocate your application to the 2nd flash page (starting at 0x4000) and include an ABM 1 header, because that's what the loader is looking for. If you need an example for that, leave a reply.
Best regards,
Ernie T. Show Less
I guess a lot of people wrote their own bootloaders for the XMC4x00. Attached you'll find a DAVE 4 project of an UART bootloader which parses Intel .HEX files and transfers it to the application flash.
specs:
- no DAVE CE, just plain code
- parses Intel .hex file and flashes it to application flash
- for XMC4300, but will also run on XMC4800 with small changes (already ran it there)
- supports custom .hex record with checksum (optional)
- UART on P0.0 (RX) and P0.1 (TX), USIC 1, ch. 1
- baudrates supported from 115200 to 1200000 baud
- incoming data is buffered into RAM during flash operation to allow sending the .hex file in burst mode
- can be controlled by simple terminal program, if UART-to-USB chip is used (FTDI/Microchip and others provide those chips)
- bootloader is triggered by pin 15.3: high -> bootloader, low -> application (if it exists)
- bootloader requires application to include ABM 1 header
- optional bootloader-to-application bridge may be integrated into application to call specific PCB initialization code when switching to bootloader
The code is documented (please read header file comments first). If you find bugs or have questions/recommendations, please reply here.
Make sure to relocate your application to the 2nd flash page (starting at 0x4000) and include an ABM 1 header, because that's what the loader is looking for. If you need an example for that, leave a reply.
Best regards,
Ernie T. Show Less
XMC™
Hello,we want to make a Motion-Controller with XMC4800 for PMSM. I have a problem with Motor-Control.I'm working with the PMSM_FOC-APP which was modif...
Show More
Hello,
we want to make a Motion-Controller with XMC4800 for PMSM. I have a problem with Motor-Control.
I'm working with the PMSM_FOC-APP which was modified for using Halls/Incremental Encoder. The Speedcontrol is working fine with Sensorless (3Phase Current measurement). I know how to implement Hall/Encoder with PLL_Estimator.RotorAngleQ31 before FOC_Controller_LIB().
Now the problem:
At the moment it is not possible to change the Rotor-Direction without Stopping the PMSM_FOC_MSM. But for Positioning it is essential to change direction of the field. Negative Torque-Values result in same motor-direction.
In the Last project we used a modified ACIM_FREQ_CTRL APP and direction-change was possible.(Without Park/Clark/PLLEstimator)
Is it possible to use the libPMSM_FOC_LIB.a for Positioning of the Motor or shut we go another way?
Are there any Examples (APPS or XMClib) for postioning with FOC?
The plan was to use Rotor-Prepositionin and activate Encoder,Positioncontrol,SpeedControl get values for build-in TorqueControl (Iq).
Is this possible?
I hope you can help me. The Controller (Position, Speed, Torque), Encoder, EtherCAT, USB, EtherNet, UART, SPI are working good, but only with one Motor-direction.
Thank you. Show Less
we want to make a Motion-Controller with XMC4800 for PMSM. I have a problem with Motor-Control.
I'm working with the PMSM_FOC-APP which was modified for using Halls/Incremental Encoder. The Speedcontrol is working fine with Sensorless (3Phase Current measurement). I know how to implement Hall/Encoder with PLL_Estimator.RotorAngleQ31 before FOC_Controller_LIB().
Now the problem:
At the moment it is not possible to change the Rotor-Direction without Stopping the PMSM_FOC_MSM. But for Positioning it is essential to change direction of the field. Negative Torque-Values result in same motor-direction.
In the Last project we used a modified ACIM_FREQ_CTRL APP and direction-change was possible.(Without Park/Clark/PLLEstimator)
Is it possible to use the libPMSM_FOC_LIB.a for Positioning of the Motor or shut we go another way?
Are there any Examples (APPS or XMClib) for postioning with FOC?
The plan was to use Rotor-Prepositionin and activate Encoder,Positioncontrol,SpeedControl get values for build-in TorqueControl (Iq).
Is this possible?
I hope you can help me. The Controller (Position, Speed, Torque), Encoder, EtherCAT, USB, EtherNet, UART, SPI are working good, but only with one Motor-direction.
Thank you. Show Less
XMC™
Hi,I have a problem running ETH_LWIP with XMC4500 Relax Kit.I followed the example project (basic ping without RTOS) provided in the usage section of ...
Show More
Hi,
I have a problem running ETH_LWIP with XMC4500 Relax Kit.
I followed the example project (basic ping without RTOS) provided in the usage section of the APP Help document of ETH_LWIP APP.
Of course, some changes in pin allocation were applied.
When I started debugging, it worked as expected. (The Relax Kit was ping-able at the specified IP address.)
But after stopping debugging, neither re-applying power nor pressing reset button could make it work again.
To find out whether the system is still running or not, I added LED toggling every second using SYSTIMER.
The LED was blinking and the kit was also ping-able when there is a live debug session.
However, the LED was not blinking without a live debug session, indicating that the system is not in operation.
When the ETH_LWIP APP was removed, the LED blinked with or without debugging.
So I suspect there must be something keeping the process from going further when the debug session is not running, especially when ETH_LWIP APP is used.
Could you please provide me an advice to solve this issue?
Thanks in advance.
My DAVE is the latest version (4.4.2) and all APPs are up-to-date.
Please find the attached DAVE CE project I have created. Show Less
I have a problem running ETH_LWIP with XMC4500 Relax Kit.
I followed the example project (basic ping without RTOS) provided in the usage section of the APP Help document of ETH_LWIP APP.
Of course, some changes in pin allocation were applied.
When I started debugging, it worked as expected. (The Relax Kit was ping-able at the specified IP address.)
But after stopping debugging, neither re-applying power nor pressing reset button could make it work again.
To find out whether the system is still running or not, I added LED toggling every second using SYSTIMER.
The LED was blinking and the kit was also ping-able when there is a live debug session.
However, the LED was not blinking without a live debug session, indicating that the system is not in operation.
When the ETH_LWIP APP was removed, the LED blinked with or without debugging.
So I suspect there must be something keeping the process from going further when the debug session is not running, especially when ETH_LWIP APP is used.
Could you please provide me an advice to solve this issue?
Thanks in advance.
My DAVE is the latest version (4.4.2) and all APPs are up-to-date.
Please find the attached DAVE CE project I have created. Show Less
XMC™
How can I use the Keil ULINK pro to debug an application from DAVE 4? I cannot find a way to configure the dubbuger to work with the ULINK pro, I can ...
Show More
How can I use the Keil ULINK pro to debug an application from DAVE 4?
I cannot find a way to configure the dubbuger to work with the ULINK pro, I can only find Jlink.
The board I am using only has the 20 Pin ULINK connector, so I cannot connect a JLink debugger.
A very horrible way would be to export the Dave project to the Keil IDE, but then with every change it would need to be exported again.
The other much bigger problem is that the free version of the Keil MDK IDE only supports code uptp 32k. I do not want to buy a Keil licence just to be able to debug a DAVE project. Show Less
I cannot find a way to configure the dubbuger to work with the ULINK pro, I can only find Jlink.
The board I am using only has the 20 Pin ULINK connector, so I cannot connect a JLink debugger.
A very horrible way would be to export the Dave project to the Keil IDE, but then with every change it would need to be exported again.
The other much bigger problem is that the free version of the Keil MDK IDE only supports code uptp 32k. I do not want to buy a Keil licence just to be able to debug a DAVE project. Show Less
XMC™
Hi,My goal is to evaluate how fast I can toggle an I/O on the XMC1100.For this, I bought the cute XMC 2Go kit and installed DAVE4.Starting point was t...
Show More
Hi,
My goal is to evaluate how fast I can toggle an I/O on the XMC1100.
For this, I bought the cute XMC 2Go kit and installed DAVE4.
Starting point was the XMC_2Go_Initial_Start_v1.3 example.
I can change the frequency of the blinking led. Toolchain works. Fine.
Then I added the line
P0_5_toggle();
In a while(1) loop.
Toggling works and time from rise to fall is about 3us.
Really slow.
According the comments in the example, the CPU clock is running on 8 Mhz.
Not sure how this works, but I need the 32 Mhz.
Changed the configuration to :
SCU_CLK->CLKCR = 0x0FFC0100UL;
This resulted in toggle time of about 1.2 us.
After this, I replaced the function call to P0_5_toggle() with it's contents:
PORT0->OMR = 0x00200020UL;
This resulted in an improvement to about 530ns.
Oops! The tooling neglects the inline directive of the P0_5_toggle() function. No idea why.
Next step is to execute the toggle code from RAM.
Therefore, I moved the toggling code to a separate function in a separate file (header + c file).
In the function declaration in the header file, I added the famous __attribute__((section(".ram_code")))
However, the tooling also neglects this directive and the code is still executed from flash.
Anybody knows a solution?
It seems that it is a tooling issue.
I tried to understand the linker script, but I did not see strange things.
Thanks,
Lodewijk
--
An investigation of the 530 ns:
The P0_5_toggle() generates 3 assembly instructions (2 loads and 1 store):
LDR: 2 cycles
LDR: 2 cycles
STR: 2 cycles
+ a B(ranch) for the while loop, good for 3 cycles
So, this is 9 cycles. If we assume 2 wait cycles for reading from flash, we have 8 additional cycles.
In total 17 cycles. 17 cycles * 31ns = 527ns. Show Less
My goal is to evaluate how fast I can toggle an I/O on the XMC1100.
For this, I bought the cute XMC 2Go kit and installed DAVE4.
Starting point was the XMC_2Go_Initial_Start_v1.3 example.
I can change the frequency of the blinking led. Toolchain works. Fine.
Then I added the line
P0_5_toggle();
In a while(1) loop.
Toggling works and time from rise to fall is about 3us.
Really slow.
According the comments in the example, the CPU clock is running on 8 Mhz.
Not sure how this works, but I need the 32 Mhz.
Changed the configuration to :
SCU_CLK->CLKCR = 0x0FFC0100UL;
This resulted in toggle time of about 1.2 us.
After this, I replaced the function call to P0_5_toggle() with it's contents:
PORT0->OMR = 0x00200020UL;
This resulted in an improvement to about 530ns.
Oops! The tooling neglects the inline directive of the P0_5_toggle() function. No idea why.
Next step is to execute the toggle code from RAM.
Therefore, I moved the toggling code to a separate function in a separate file (header + c file).
In the function declaration in the header file, I added the famous __attribute__((section(".ram_code")))
However, the tooling also neglects this directive and the code is still executed from flash.
Anybody knows a solution?
It seems that it is a tooling issue.
I tried to understand the linker script, but I did not see strange things.
Thanks,
Lodewijk
--
An investigation of the 530 ns:
The P0_5_toggle() generates 3 assembly instructions (2 loads and 1 store):
LDR: 2 cycles
LDR: 2 cycles
STR: 2 cycles
+ a B(ranch) for the while loop, good for 3 cycles
So, this is 9 cycles. If we assume 2 wait cycles for reading from flash, we have 8 additional cycles.
In total 17 cycles. 17 cycles * 31ns = 527ns. Show Less
XMC™
Unfortunately, I can only guess the switch-on of the pull-downs in host mode implicitly from the data sheet.According the USB physical layer specifica...
Show More
Unfortunately, I can only guess the switch-on of the pull-downs in host mode implicitly from the data sheet.
According the USB physical layer specification, I know a 15kohm pull down must be implemented for speed
detection (see picture below)
In the data sheet the pull down are specified
.
Now my question:
Do I have to explicitly activate the pull-down or is it sufficient to operate the peripheral in host mode?
Best regards
EbbeSand Show Less
According the USB physical layer specification, I know a 15kohm pull down must be implemented for speed
detection (see picture below)
In the data sheet the pull down are specified
.
Now my question:
Do I have to explicitly activate the pull-down or is it sufficient to operate the peripheral in host mode?
Best regards
EbbeSand Show Less
XMC™
Hello Forum,It is possible that I can uns a USIC Interface in this matter that the SPI Master is send 16 clocks, and read the 16 Bit from two slave in...
Show More
Hello Forum,
It is possible that I can uns a USIC Interface in this matter that the SPI Master is send
16 clocks, and read the 16 Bit from two slave into the Input Register of the XMC.
I don't care if the two individual data words were then nested in a 32-bit data word
Slave 1 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15
Slave 2 b1 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15
In-Buffer a0 b0 a1 b1 a2 b2 a3 b3 a4 b4 a5 b5 a6 b6 a7 b7 a8 b8 a9 b9 a10 b10 a11 b11 a12 b12 a13 b13 a14 b14 a15 b15
Is such a mode of operation possible with an XMC USIC
Best regards
Ebbe Sand Show Less
It is possible that I can uns a USIC Interface in this matter that the SPI Master is send
16 clocks, and read the 16 Bit from two slave into the Input Register of the XMC.
I don't care if the two individual data words were then nested in a 32-bit data word
Slave 1 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15
Slave 2 b1 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15
In-Buffer a0 b0 a1 b1 a2 b2 a3 b3 a4 b4 a5 b5 a6 b6 a7 b7 a8 b8 a9 b9 a10 b10 a11 b11 a12 b12 a13 b13 a14 b14 a15 b15
Is such a mode of operation possible with an XMC USIC
Best regards
Ebbe Sand Show Less
XMC™
Hello,My XMC4400 runs at 120[MHz] which is also the input clock frequency to CCU4 (and 8). In order to make my timer tick every microsecond I need to ...
Show More
Hello,
My XMC4400 runs at 120[MHz] which is also the input clock frequency to CCU4 (and 8). In order to make my timer tick every microsecond I need to divide the input clock by 120, but the best available match is 128.
Is there a way to achieve the desired frequency without interrupts, without the SysTick etc.? PWM generation is quite flexible, but can it be used to maintain a free running timer (again, minimizing software
involvement in counter management)?
Thanks in advance. Show Less
My XMC4400 runs at 120[MHz] which is also the input clock frequency to CCU4 (and 8). In order to make my timer tick every microsecond I need to divide the input clock by 120, but the best available match is 128.
Is there a way to achieve the desired frequency without interrupts, without the SysTick etc.? PWM generation is quite flexible, but can it be used to maintain a free running timer (again, minimizing software
involvement in counter management)?
Thanks in advance. Show Less
XMC™
Hello together,i have a weird phenomen on a XMC-4500 Relax kit. I have a motor controler project which i want to expand with can functionality. I adde...
Show More
Hello together,
i have a weird phenomen on a XMC-4500 Relax kit. I have a motor controler project which i want to expand with can functionality. I added the CAN-Node-App in Dave, configured it and added some messages and interrupts. So far so good.
When I tested it, it seemed like the node doesn't send the dominant ack bit on receiving messages. Using a cananalyzer software showed the same. I thought I made a configuration mistake and created a second small testproject. Same settings,
but now the can node reacts like it should, sending acks und reacting to received messages. Changing to the main project, the can shows again no reaction. Even after compairing the NCR and NSR registers in both projects in debug,
i can spot no difference or reason that would explain the behaviour. NCR.INIT is 0. NCR.CALM is 0. I even compaired the code generated by dave. But in the Can-node or can global files are no differences.
Has anybody an idea what could make the problems or what i can also try?
Thanks in advance
regards
b2kbutt Show Less
i have a weird phenomen on a XMC-4500 Relax kit. I have a motor controler project which i want to expand with can functionality. I added the CAN-Node-App in Dave, configured it and added some messages and interrupts. So far so good.
When I tested it, it seemed like the node doesn't send the dominant ack bit on receiving messages. Using a cananalyzer software showed the same. I thought I made a configuration mistake and created a second small testproject. Same settings,
but now the can node reacts like it should, sending acks und reacting to received messages. Changing to the main project, the can shows again no reaction. Even after compairing the NCR and NSR registers in both projects in debug,
i can spot no difference or reason that would explain the behaviour. NCR.INIT is 0. NCR.CALM is 0. I even compaired the code generated by dave. But in the Can-node or can global files are no differences.
Has anybody an idea what could make the problems or what i can also try?
Thanks in advance
regards
b2kbutt Show Less