XMC™ Forum Discussions
XMC™
We are working with Infineon xmc4500 .
Is it possible to program the processor / update the firmware over the Ethernet?
Thanks Yinon
Is it possible to program the processor / update the firmware over the Ethernet?
Thanks Yinon
XMC™
Hi all, i used the XMC flasher tool in Version 1.02 for several months, but no the tool is suddenly not working. It starts with the message "Unable to...
Show More
Hi all,
i used the XMC flasher tool in Version 1.02 for several months, but no the tool is suddenly not working. It starts with the message "Unable to load segger dll switching to DAP".
I've already tried to reinstall the segger software package but without any success. Do somebody know how to fix this issue?
Regards,
Stefan Show Less
i used the XMC flasher tool in Version 1.02 for several months, but no the tool is suddenly not working. It starts with the message "Unable to load segger dll switching to DAP".
I've already tried to reinstall the segger software package but without any success. Do somebody know how to fix this issue?
Regards,
Stefan Show Less
XMC™
Hello,I am having problems with a MicroSD Card on the XMC4500 Relax Kit.I can not use the full SDMMC interface but instead I chose the SPI mode of the...
Show More
Hello,
I am having problems with a MicroSD Card on the XMC4500 Relax Kit.
I can not use the full SDMMC interface but instead I chose the SPI mode of the FATFS App.
The SPI signals are allocated to:
MISO P4.0 (SDMMC_DAT0)
MOSI P3.5 (SDMMC_CMD)
SCLK P3.6 (SDMMC_CLK)
SS P4.1 (SDMMC_DAT3)
I use the demo code of the FATFS App documentation.
This code passes
res = f_mount(&fs, "0:", 1);
without problems, but the next statement
res = f_mkdir("XMC4500");
returns with "FR_DISK_ERR"
The SDcard is OK, I tried various sizes, and various SPI Clock frequencies.
Any idea?? Show Less
I am having problems with a MicroSD Card on the XMC4500 Relax Kit.
I can not use the full SDMMC interface but instead I chose the SPI mode of the FATFS App.
The SPI signals are allocated to:
MISO P4.0 (SDMMC_DAT0)
MOSI P3.5 (SDMMC_CMD)
SCLK P3.6 (SDMMC_CLK)
SS P4.1 (SDMMC_DAT3)
I use the demo code of the FATFS App documentation.
This code passes
res = f_mount(&fs, "0:", 1);
without problems, but the next statement
res = f_mkdir("XMC4500");
returns with "FR_DISK_ERR"
The SDcard is OK, I tried various sizes, and various SPI Clock frequencies.
Any idea?? Show Less
XMC™
I'm writing an I2C driver for the XMC4700 and am having problems getting it to actually do anything on the I2C bus. I'm not using DAVE, or any librari...
Show More
I'm writing an I2C driver for the XMC4700 and am having problems getting it to actually do anything on the I2C bus. I'm not using DAVE, or any libraries--I'm writing to the peripheral registers directly.
The hardware configuration is the XMC4700 Relax board. I'm configuring my I2C driver to use USIC channel U1C1, with the pins configured as follows: SDA (P3.15 DX0A/DOUT0), SCL (P0.13 DX1B/SCLKOUT). I have the pins themselves configured as outputs, ALT Function 2, open drain.
I have taken USIC1 and PORTS out of reset.
Here's how I have U1C1 configured:
KSCFG = USIC_CH_KSCFG_MODEN_Msk | USIC_CH_KSCFG_BPMODEN_Msk
CCR = 4
PCR = USIC_CH_PCR_IICMode_SCRIEN_Msk | USIC_CH_PCR_IICMode_RSCRIEN_Msk | USIC_CH_PCR_IICMode_PCRIEN_Msk |
USIC_CH_PCR_IICMode_NACKIEN_Msk | USIC_CH_PCR_IICMode_ARLIEN_Msk | USIC_CH_PCR_IICMode_ERRIEN_Msk |
USIC_CH_PCR_IICMode_ACKIEN_Msk | (0xa << USIC_CH_PCR_IICMode_HDEL_Pos)
DX0CR = USIC_CH_DX0CR_DSEN_Msk | 0b000
DX1CR = USIC_CH_DX1CR_DSEN_Msk | 0b001
SCTR = USIC_CH_SCTR_SDIR_Msk | (1 << USIC_CH_SCTR_PDL_Pos) | (0b11 << USIC_CH_SCTR_TRM_Pos) | (0x3f << USIC_CH_SCTR_FLE_Pos) | (7 << USIC_CH_SCTR_WLE_Pos)
TCSR = (0b01 << USIC_CH_TCSR_TDEN_Pos) | USIC_CH_TCSR_TDSSM_Msk
BRG = (9 << USIC_CH_BRG_DCTQ_Pos) | ((pdiv - 1) << USIC_CH_BRG_PDIV_Pos);
FDR = (step << USIC_CH_FDR_STEP_Pos) | (2 << USIC_CH_FDR_DM_Pos);
After setting everything up as above, I'm attempting to do an I2C write operation to an MCP9808 temperature sensor connected to the I2C bus attached to P0.13 and P3.15. Both SCL and SDA have 10K pull-ups to Vcc. There are no other I2C devices on the bus. To start the transfer, I'm writing the following to U1C1's TBUF[0] register:
TBUF[0] = (0b100 << 😎 | (slaveaddr << 1)
That should cause the USIC to initiate an I2C start condition on the bus and send the slave address on the bus. I've got a logic analyzer connected to both SCL and SDA and see no transitions on either line. When I write to TBUF[0], the only U1C1 register changes I see are these:
TCSR.TDV changes from 0 to 1
TCSR.TE changes from 0 to 1
In particular, I do not see PSR.SCR go to 1, which would indicate the START condition has been initiated. I do see that DX0CR.DXS = 1 and DX1CR.DXS = 1, which, if I'm reading the reference manual correctly, should be the current values of the bus lines. They should be high in idle state, which they are, but they should transition during a start sequence, which they don't.
Since I'm not seeing any I2C bus activity, I checked that the two ports (P0.13/P3.15) work as normal GPIO ports, and they do, both as push-pull outputs and open-drain outputs.
What am I missing here? I'm sure that I have a minor configuration error preventing things from working, but I've been over the code many times and just don't see it. Show Less
The hardware configuration is the XMC4700 Relax board. I'm configuring my I2C driver to use USIC channel U1C1, with the pins configured as follows: SDA (P3.15 DX0A/DOUT0), SCL (P0.13 DX1B/SCLKOUT). I have the pins themselves configured as outputs, ALT Function 2, open drain.
I have taken USIC1 and PORTS out of reset.
Here's how I have U1C1 configured:
KSCFG = USIC_CH_KSCFG_MODEN_Msk | USIC_CH_KSCFG_BPMODEN_Msk
CCR = 4
PCR = USIC_CH_PCR_IICMode_SCRIEN_Msk | USIC_CH_PCR_IICMode_RSCRIEN_Msk | USIC_CH_PCR_IICMode_PCRIEN_Msk |
USIC_CH_PCR_IICMode_NACKIEN_Msk | USIC_CH_PCR_IICMode_ARLIEN_Msk | USIC_CH_PCR_IICMode_ERRIEN_Msk |
USIC_CH_PCR_IICMode_ACKIEN_Msk | (0xa << USIC_CH_PCR_IICMode_HDEL_Pos)
DX0CR = USIC_CH_DX0CR_DSEN_Msk | 0b000
DX1CR = USIC_CH_DX1CR_DSEN_Msk | 0b001
SCTR = USIC_CH_SCTR_SDIR_Msk | (1 << USIC_CH_SCTR_PDL_Pos) | (0b11 << USIC_CH_SCTR_TRM_Pos) | (0x3f << USIC_CH_SCTR_FLE_Pos) | (7 << USIC_CH_SCTR_WLE_Pos)
TCSR = (0b01 << USIC_CH_TCSR_TDEN_Pos) | USIC_CH_TCSR_TDSSM_Msk
BRG = (9 << USIC_CH_BRG_DCTQ_Pos) | ((pdiv - 1) << USIC_CH_BRG_PDIV_Pos);
FDR = (step << USIC_CH_FDR_STEP_Pos) | (2 << USIC_CH_FDR_DM_Pos);
After setting everything up as above, I'm attempting to do an I2C write operation to an MCP9808 temperature sensor connected to the I2C bus attached to P0.13 and P3.15. Both SCL and SDA have 10K pull-ups to Vcc. There are no other I2C devices on the bus. To start the transfer, I'm writing the following to U1C1's TBUF[0] register:
TBUF[0] = (0b100 << 😎 | (slaveaddr << 1)
That should cause the USIC to initiate an I2C start condition on the bus and send the slave address on the bus. I've got a logic analyzer connected to both SCL and SDA and see no transitions on either line. When I write to TBUF[0], the only U1C1 register changes I see are these:
TCSR.TDV changes from 0 to 1
TCSR.TE changes from 0 to 1
In particular, I do not see PSR.SCR go to 1, which would indicate the START condition has been initiated. I do see that DX0CR.DXS = 1 and DX1CR.DXS = 1, which, if I'm reading the reference manual correctly, should be the current values of the bus lines. They should be high in idle state, which they are, but they should transition during a start sequence, which they don't.
Since I'm not seeing any I2C bus activity, I checked that the two ports (P0.13/P3.15) work as normal GPIO ports, and they do, both as push-pull outputs and open-drain outputs.
What am I missing here? I'm sure that I have a minor configuration error preventing things from working, but I've been over the code many times and just don't see it. Show Less
XMC™
Hello everyone!As I'm much inexperienced in C, I'm having some trouble working with the Demo Position2Go Radar. I have been following the tutorials av...
Show More
Hello everyone!
As I'm much inexperienced in C, I'm having some trouble working with the Demo Position2Go Radar.
I have been following the tutorials available and I'm trying to run the example get_data.c but without luck and the only possible way to communicate with the radar for my project is to be able to use the API written in C. (It should be communicating with ROS)
Is there any step-by-step tutorial that might help me? As for now, I cannot even compile the file. Show Less
As I'm much inexperienced in C, I'm having some trouble working with the Demo Position2Go Radar.
I have been following the tutorials available and I'm trying to run the example get_data.c but without luck and the only possible way to communicate with the radar for my project is to be able to use the API written in C. (It should be communicating with ROS)
Is there any step-by-step tutorial that might help me? As for now, I cannot even compile the file. Show Less
XMC™
Hello! I was wondering if someone could help me understand the jump from application to application in more detail in a two application on one flash t...
Show More
Hello! I was wondering if someone could help me understand the jump from application to application in more detail in a two application on one flash target scheme. Currently I am testing on a xmc4700 relax kit.
Application one is the bootloader and lives in flash memory 0x0C000000.
Application two is the application layer and lives in flash memory 0x0C010000
Each application is its own Dave project right now.
I've triggered a manual jump from bootloader to application layer using the abm0 header successfully.
From the application layer, I can also trigger a manual reset to the Bootloader sucessfully
The scenario is when application layer spins forever in a while loop. The internal watchdog counter times out after a preset time.
Currently, after the bootloader jumps to the application layer, when the watchdog resets in the application layer, I've observed the application gets reset to running again. If possible, can someone help me understand some strategies on how to reset from a watchdog timeout in the application layer and boot back into the bootloader? Is it as simple as simply calling Reset_to_Bootloader() in the Watchdog_Handler(), or should I be messing with some program counter register, reloading the bootloader's vector table, then branching to bootloader?
Thanks!
Brian Show Less
Application one is the bootloader and lives in flash memory 0x0C000000.
Application two is the application layer and lives in flash memory 0x0C010000
Each application is its own Dave project right now.
I've triggered a manual jump from bootloader to application layer using the abm0 header successfully.
void BL_FlashABM0_Restart(void)
{
/* Restart in alternative bootmode 0 */
/* Clear the reset cause field for proper reset detection of the ssw */
XMC_SCU_RESET_ClearDeviceResetReason();
/* Set ABM0 as boot mode in SWCON field of STCON register */
XMC_SCU_SetBootMode(XMC_SCU_BOOTMODE_ABM0);
/* Trigger power on reset */
PPB->AIRCR = 1 << PPB_AIRCR_SYSRESETREQ_Pos |0x5FA<}
From the application layer, I can also trigger a manual reset to the Bootloader sucessfully
void Reset_to_Bootloader(void)
{
/* Clear the reset cause field for proper reset detection of the ssw */
SCU_RESET->RSTCLR = 1</* Set ABM0 as boot mode in SWCON field of STCON register */
WR_REG(SCU_GENERAL->STCON,
SCU_GENERAL_STCON_SWCON_Msk,
SCU_GENERAL_STCON_SWCON_Pos,
SW_CONFIG_Normal);
/* request system reset */
PPB->AIRCR = 1 << PPB_AIRCR_SYSRESETREQ_Pos |
0x5FA<}
The scenario is when application layer spins forever in a while loop. The internal watchdog counter times out after a preset time.
Currently, after the bootloader jumps to the application layer, when the watchdog resets in the application layer, I've observed the application gets reset to running again. If possible, can someone help me understand some strategies on how to reset from a watchdog timeout in the application layer and boot back into the bootloader? Is it as simple as simply calling Reset_to_Bootloader() in the Watchdog_Handler(), or should I be messing with some program counter register, reloading the bootloader's vector table, then branching to bootloader?
Thanks!
Brian Show Less
XMC™
My program puts data into FIFO of USIC. But this data is not immediately transferred to transmitter buffer (USIC.TBUF). Transfer to USIC.TBUF is carri...
Show More
My program puts data into FIFO of USIC. But this data is not immediately transferred to transmitter buffer (USIC.TBUF). Transfer to USIC.TBUF is carried out only by a signal from timer.
Everything works correctly as I want. Except for one little thing: I connected this timer signal (which starts copying USIC.FIFO -> USIC.TBUF) to an external pin. And I see that beginning of start bit (on USIC.TXD) is delayed by ~0.25mcs relative to timer signal.
Why does this delay occur??? I expected edge of start bit will happen synchronously with edge of timer signal.
Clock frequency of timer and USIC == 144MHz. Baudrate of USIC == 1Mbod. Show Less
Everything works correctly as I want. Except for one little thing: I connected this timer signal (which starts copying USIC.FIFO -> USIC.TBUF) to an external pin. And I see that beginning of start bit (on USIC.TXD) is delayed by ~0.25mcs relative to timer signal.
Why does this delay occur??? I expected edge of start bit will happen synchronously with edge of timer signal.
Clock frequency of timer and USIC == 144MHz. Baudrate of USIC == 1Mbod. Show Less
XMC™
there is no surport for EBU peripherel in Dave App about XMC4000 mcu. And it is hard to search any demo for EBU too. I try hard to write some code abo...
Show More
there is no surport for EBU peripherel in Dave App about XMC4000 mcu. And it is hard to search any demo for EBU too.
I try hard to write some code about EBU peripherel , but it did'nt run well,it is dead,the debug led stop to flush.
target:access to multiplexed device. adv#, cs#, rd#,wr#,AD[15:0] signals is used. Show Less
I try hard to write some code about EBU peripherel , but it did'nt run well,it is dead,the debug led stop to flush.
target:access to multiplexed device. adv#, cs#, rd#,wr#,AD[15:0] signals is used. Show Less
XMC™
Hi guys,After reading a lot of papers and webpages I'm a little confused. Question: Can I use the swd interface and the UART interface at the same tim...
Show More
Hi guys,
After reading a lot of papers and webpages I'm a little confused. Question: Can I use the swd interface and the UART interface at the same time with BMI = SWD0? The goal of this would be to communicate over the UART while the firmware is been debug.
uC = XMC1302
Thank you in advance
Pablo Show Less
After reading a lot of papers and webpages I'm a little confused. Question: Can I use the swd interface and the UART interface at the same time with BMI = SWD0? The goal of this would be to communicate over the UART while the firmware is been debug.
uC = XMC1302
Thank you in advance
Pablo Show Less
XMC™
Hi ForumI have two problem with my device and after consulting almost whole google and this forum, I`ve created now this thread.So yes, i have checked...
Show More
Hi Forum
I have two problem with my device and after consulting almost whole google and this forum, I`ve created now this thread.
So yes, i have checked all the sample projects and the other threads around those two problems.
My setup is: XM4300 Device (EtherCAT is working fine)
I2C Slave TMP2 and TMP3 (tried both, same result)
Dave version 4.4.2 and newest apps. (I2C Master version 4.1.30)
Now my first problem:
I don`t get the I2C bus running, tried different approaches
On the oscilloscope, there is only repeated bit send, but no communication at all.
I am very confused about the different app versions, dos and don`t and i can`t find any clear tutorial with the newest version.. (also confusing with different parameters/options in the different I2C Master config dialog..
There is also something around regarding the slave address is not 1:1 usable and needs to be converted?
Second problem:
I want to have debug messages. So i tried all the stuff with XMC_DEBUG_ENABLE in preprosessor and the other options that needs to be activated and also checkec this one https://www.infineonforums.com/threads/3489-DAVE-TIP-of-the-day-Semihosting-in-DAVEv4?
.. but then i get compile error and its just not working..
So also there, i can`t find any document/tutorial based on the newest software/app versions.
I really hope you guys can help me, thank you!
Regards
Roman Show Less
I have two problem with my device and after consulting almost whole google and this forum, I`ve created now this thread.
So yes, i have checked all the sample projects and the other threads around those two problems.
My setup is: XM4300 Device (EtherCAT is working fine)
I2C Slave TMP2 and TMP3 (tried both, same result)
Dave version 4.4.2 and newest apps. (I2C Master version 4.1.30)
Now my first problem:
I don`t get the I2C bus running, tried different approaches
#define TMP2_ADDRESS (0x4B)
#define reg_TMP2 (0x00)
I2C_MASTER_Init(&I2C_MASTER_0);
I2C_MASTER_SendStart(&I2C_MASTER_0, TMP2_ADDRESS, XMC_I2C_CH_CMD_WRITE);
I2C_MASTER_SendRepeatedStart(&I2C_MASTER_0, TMP2_ADDRESS, XMC_I2C_CH_CMD_READ);
received_data = I2C_MASTER_GetReceivedByte(&I2C_MASTER_0);
On the oscilloscope, there is only repeated bit send, but no communication at all.
I am very confused about the different app versions, dos and don`t and i can`t find any clear tutorial with the newest version.. (also confusing with different parameters/options in the different I2C Master config dialog..
There is also something around regarding the slave address is not 1:1 usable and needs to be converted?
Second problem:
I want to have debug messages. So i tried all the stuff with XMC_DEBUG_ENABLE in preprosessor and the other options that needs to be activated and also checkec this one https://www.infineonforums.com/threads/3489-DAVE-TIP-of-the-day-Semihosting-in-DAVEv4?
.. but then i get compile error and its just not working..
So also there, i can`t find any document/tutorial based on the newest software/app versions.
I really hope you guys can help me, thank you!
Regards
Roman Show Less
Trending discussions