XMC™ Forum Discussions
Sort by:
XMC™
Hello,On the XMC4500 I set up USIC1_0 as SPI master and USIC1_1 as SPI slave, for the SPI master GPDMA0_0 channel is used for Tx data, for the SPI sla...
Show More
Hello,
On the XMC4500 I set up USIC1_0 as SPI master and USIC1_1 as SPI slave,
for the SPI master GPDMA0_0 channel is used for Tx data, for the SPI slave GPDMA0_1 channel is used for Rx data.
All work fine as long as the Tx data of SPI master and Rx data of SPI slave runs successively,
but if both starts "quite" simultanously, the SPI slave with GPDMA0_1 doesn´t run proper, Clk and MOSI lines look fine on oscilloscope.
At the first view it seems there is priority problem in setting of GPDMA0_0 for Tx and GPDMA0_1 for Rx.
But after setting up of GPDMA0_1 for Rx with a higher priority than GPDMA0_0 for Tx, it still doesn´t run proper.
Burst length of 1 word is used for both DMA transfers without any FIFO.
@Infineon experts for GPDMA:
I would be appreciated for any hints/tip I could try out. Many thanks in advance. Show Less
On the XMC4500 I set up USIC1_0 as SPI master and USIC1_1 as SPI slave,
for the SPI master GPDMA0_0 channel is used for Tx data, for the SPI slave GPDMA0_1 channel is used for Rx data.
All work fine as long as the Tx data of SPI master and Rx data of SPI slave runs successively,
but if both starts "quite" simultanously, the SPI slave with GPDMA0_1 doesn´t run proper, Clk and MOSI lines look fine on oscilloscope.
At the first view it seems there is priority problem in setting of GPDMA0_0 for Tx and GPDMA0_1 for Rx.
But after setting up of GPDMA0_1 for Rx with a higher priority than GPDMA0_0 for Tx, it still doesn´t run proper.
Burst length of 1 word is used for both DMA transfers without any FIFO.
@Infineon experts for GPDMA:
I would be appreciated for any hints/tip I could try out. Many thanks in advance. Show Less
XMC™
Hello,On the XMC4500 I set up USIC1_0 as SPI master and USIC1_1 as SPI slave, for the SPI master GPDMA0_0 channel is used for Tx data, for the SPI sla...
Show More
Hello,
On the XMC4500 I set up USIC1_0 as SPI master and USIC1_1 as SPI slave,
for the SPI master GPDMA0_0 channel is used for Tx data, for the SPI slave GPDMA0_1 channel is used for Rx data.
All work fine as long as the Tx data of SPI master and Rx data of SPI slave runs successively,
but if both starts "quite" simultanously, the SPI slave with GPDMA0_1 doesn´t run proper, Clk and MOSI lines look fine on oscilloscope.
At the first view it seems there is priority problem in setting of GPDMA0_0 for Tx and GPDMA0_1 for Rx.
But after setting up of GPDMA0_1 for Rx with a higher priority than GPDMA0_0 for Tx, it still doesn´t run proper.
Burst length of 1 word is used for both DMA transfers without any FIFO.
@Infineon experts for GPDMA:
I would be appreciated for any hints/tip I could try out. Many thanks in advance. Show Less
On the XMC4500 I set up USIC1_0 as SPI master and USIC1_1 as SPI slave,
for the SPI master GPDMA0_0 channel is used for Tx data, for the SPI slave GPDMA0_1 channel is used for Rx data.
All work fine as long as the Tx data of SPI master and Rx data of SPI slave runs successively,
but if both starts "quite" simultanously, the SPI slave with GPDMA0_1 doesn´t run proper, Clk and MOSI lines look fine on oscilloscope.
At the first view it seems there is priority problem in setting of GPDMA0_0 for Tx and GPDMA0_1 for Rx.
But after setting up of GPDMA0_1 for Rx with a higher priority than GPDMA0_0 for Tx, it still doesn´t run proper.
Burst length of 1 word is used for both DMA transfers without any FIFO.
@Infineon experts for GPDMA:
I would be appreciated for any hints/tip I could try out. Many thanks in advance. Show Less
XMC™
Understand from the example code of ASCloader,the USIC setting was configure by ASC_Init();What is correct setting if baud rate need change to 9600?Al...
Show More
Understand from the example code of ASCloader,
the USIC setting was configure by ASC_Init();
What is correct setting if baud rate need change to 9600?
Also what is the default UART baud rate for ASCloader?
/* USIC : FIFO DPTR & SIZE MASK and POS Values */
#define USIC_CH_TBCTR_DPTRSIZE_Pos (0U)
#define USIC_CH_TBCTR_DPTRSIZE_Msk (0x0700003FU << USIC_CH_TBCTR_DPTRSIZE_Pos)
#define USIC_CH_RBCTR_DPTRSIZE_Pos (0U)
#define USIC_CH_RBCTR_DPTRSIZE_Msk (0x0700003FU << USIC_CH_RBCTR_DPTRSIZE_Pos)
void ASC_Init(void)
{
//********* MODULE USIC CONFIGURATIONS *************************
/*USIC 0 Channel 0 Mux Related SFR/Bitfields Configurations*/
WR_REG(USIC0_CH0->DX0CR, USIC_CH_DX0CR_DSEL_Msk, USIC_CH_DX0CR_DSEL_Pos,1);
// Data Pointer & Buffer Size for Transmitter Buffer Control
WR_REG(USIC0_CH0->TBCTR, USIC_CH_TBCTR_DPTRSIZE_Msk, USIC_CH_TBCTR_DPTRSIZE_Pos,0x01000000); /* DPTR = 0, SIZE = 1 */
// Data Pointer & Buffer Size for Receiver Buffer Control
WR_REG(USIC0_CH0->RBCTR, USIC_CH_RBCTR_DPTRSIZE_Msk, USIC_CH_RBCTR_DPTRSIZE_Pos,0x01000000); /* DPTR = 0, SIZE = 1 */
}
Regards
Joy Show Less
the USIC setting was configure by ASC_Init();
What is correct setting if baud rate need change to 9600?
Also what is the default UART baud rate for ASCloader?
/* USIC : FIFO DPTR & SIZE MASK and POS Values */
#define USIC_CH_TBCTR_DPTRSIZE_Pos (0U)
#define USIC_CH_TBCTR_DPTRSIZE_Msk (0x0700003FU << USIC_CH_TBCTR_DPTRSIZE_Pos)
#define USIC_CH_RBCTR_DPTRSIZE_Pos (0U)
#define USIC_CH_RBCTR_DPTRSIZE_Msk (0x0700003FU << USIC_CH_RBCTR_DPTRSIZE_Pos)
void ASC_Init(void)
{
//********* MODULE USIC CONFIGURATIONS *************************
/*USIC 0 Channel 0 Mux Related SFR/Bitfields Configurations*/
WR_REG(USIC0_CH0->DX0CR, USIC_CH_DX0CR_DSEL_Msk, USIC_CH_DX0CR_DSEL_Pos,1);
// Data Pointer & Buffer Size for Transmitter Buffer Control
WR_REG(USIC0_CH0->TBCTR, USIC_CH_TBCTR_DPTRSIZE_Msk, USIC_CH_TBCTR_DPTRSIZE_Pos,0x01000000); /* DPTR = 0, SIZE = 1 */
// Data Pointer & Buffer Size for Receiver Buffer Control
WR_REG(USIC0_CH0->RBCTR, USIC_CH_RBCTR_DPTRSIZE_Msk, USIC_CH_RBCTR_DPTRSIZE_Pos,0x01000000); /* DPTR = 0, SIZE = 1 */
}
Regards
Joy Show Less
XMC™
Hi,I tried to build a project but i keep getting the same error over and over again:'Building target: PI_CONTROLLER.elf''Invoking: ARM-GCC C Linker'"C...
Show More
Hi,
I tried to build a project but i keep getting the same error over and over again:
'Building target: PI_CONTROLLER.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -T"../PI_CONTROLLER.ld" -nostartfiles -Xlinker --gc-sections -L"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1.10\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI" -Wl,-Map,"PI_CONTROLLER.map" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "PI_CONTROLLER.elf" "@makefile.rsp"
c:/dave-3.1.10/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m\libg.a(lib_a-fini.o): In function `__libc_fini_array':
fini.c:(.text.__libc_fini_array+0x42): undefined reference to `_fini'
collect2.exe: error: ld returned 1 exit status
make: *** [PI_CONTROLLER.elf] Error 1
Any hints on this?
Thanks Show Less
I tried to build a project but i keep getting the same error over and over again:
'Building target: PI_CONTROLLER.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -T"../PI_CONTROLLER.ld" -nostartfiles -Xlinker --gc-sections -L"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1.10\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI" -Wl,-Map,"PI_CONTROLLER.map" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "PI_CONTROLLER.elf" "@makefile.rsp"
c:/dave-3.1.10/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m\libg.a(lib_a-fini.o): In function `__libc_fini_array':
fini.c:(.text.__libc_fini_array+0x42): undefined reference to `_fini'
collect2.exe: error: ld returned 1 exit status
make: *** [PI_CONTROLLER.elf] Error 1
Any hints on this?
Thanks Show Less
XMC™
Hi,I'm trying to build my project but i get this error that I can´t solve:'Building target: PI_CONTROLLER.elf''Invoking: ARM-GCC C Linker'"C:\DAVE-3.1...
Show More
Hi,
I'm trying to build my project but i get this error that I can´t solve:
'Building target: PI_CONTROLLER.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -T"../PI_CONTROLLER.ld" -nostartfiles -L"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1.10\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI" -Wl,-Map,"PI_CONTROLLER.map" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "PI_CONTROLLER.elf" "@makefile.rsp"
c:/dave-3.1.10/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m\libg.a(lib_a-fini.o): In function `__libc_fini_array':
fini.c: (.text.__libc_fini_array+0x42): undefined reference to `_fini'
collect2.exe: error: ld returned 1 exit status
make: *** [PI_CONTROLLER.elf] Error 1
Any hints?
Thanks,
bamn Show Less
I'm trying to build my project but i get this error that I can´t solve:
'Building target: PI_CONTROLLER.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1.10\ARM-GCC/bin/arm-none-eabi-gcc" -T"../PI_CONTROLLER.ld" -nostartfiles -L"C:\DAVE-3.1.10\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1.10\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1.10\eclipse\/../emWin/Start/GUI" -Wl,-Map,"PI_CONTROLLER.map" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "PI_CONTROLLER.elf" "@makefile.rsp"
c:/dave-3.1.10/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv7e-m\libg.a(lib_a-fini.o): In function `__libc_fini_array':
fini.c: (.text.__libc_fini_array+0x42): undefined reference to `_fini'
collect2.exe: error: ld returned 1 exit status
make: *** [PI_CONTROLLER.elf] Error 1
Any hints?
Thanks,
bamn Show Less
XMC™
I'm trying to get the quadrature decoder interrupts working. I am using a TSWA3NCD23LFS rotary encoder push button. I have the ACOM pin wired directly...
Show More
I'm trying to get the quadrature decoder interrupts working. I am using a TSWA3NCD23LFS rotary encoder push button. I have the ACOM pin wired directly to P1.1 and the BCOM pin wired directly to 0.13. I set both pins to pull-up inputs on their corresponding IOCR's (PORT0 -> IOCR12 = 0x000010C0; and PORT1 -> IOCR0 = 0x80101080; ). Here are the following Quadrature Decoder bits that I set:
POSIF0 -> PRUNC = 0x03; // Stop and reset POSIF 0
// Quadrature Decode Mode Enable (FSEL)
// Direction Count Mode (QDCM)
// IN0B (0.13 BCOM) for Phase A (INSEL0)
// IN1A (1.1 ACOM) for Phase B (INSEL1)
// Max lowpass
POSIF0 -> PCONF = 0x70000101; // 0000 0000 0000 0000 0000 0001 0000 0101
POSIF0 -> PSUS = 0x00000000; // Use suspend mode defaults
// Phase A active high (PALS)
// Phase B active high (PBLS)
// Clockwise, Phase A (BCOM) leading (PHS)
POSIF0 -> QDC = 0x00000003;
POSIF0 -> PFLGE = 0x00000000; // Disable all POSIF 0 interrupts
Here are my clock settings:
SCU_GENERAL -> PASSWD = 0x000000C0; // Disable bit protection scheme
// Configure CCU40 Global Settings
CCU40 -> GCTRL = 0x00000000; // Use global control defaults
CCU40 -> GIDLC = 0x0000010F; // Bring all slices and prescaler out of idle
// Set up CCU4.1.0 to work with Rotary encoder control
CCU40_CC40 -> TCCLR = 0x00000007; // Stop and clear timer; clear dither counter.
CCU40_CC40 -> INS = 0x003F0455; // POSIF 1 CLK -> Event 0, 1, and 2; Event 1 rising edge enable only. 0001 0000 0100 0100 0100
CCU40_CC40 -> CMC = 0x00000001; // Event 0 -> start.
CCU40_CC40 -> TC = 0x00000402; // Set timer to one-shot mode, Event 0 clears and starts timer.
CCU40_CC40 -> PSC = 0x0000000D; // Set prescaler to divide by 8192.
CCU40_CC40 -> PRS = 20UL; // Set period shadow register to 50 (~5mS period).
CCU40_CC40 -> INTE = 0x00000001; // Enable counter interrupt on period match.
CCU40 -> GCSS = 0x00001111; // Initiate shadow transfer.
I then enable the interrupt CCU40_0:
NVIC_EnableIRQ(CCU40_0_IRQn);
I also am trying to capture any of the decoder values but nothing changes when I turn the rotary encoder. Values are always as follows corresponding to the order they are listed below: 0, 2, 4, 8.
current = POSIF_PDBG_QCSV_Pos; // Current position of encoder
previous = POSIF_PDBG_QPSV_Pos; // Previous position of encoder
ival = POSIF_PDBG_IVAL_Pos; // Current index of encoder
direction = POSIF_QDC_DVAL_Pos;
I have the interrupt functions declared and it should write text to an matrix display if entered:
void CCU40_0_IRQHandler(void){
int i;
for(i=0;i<100;i++){
serial_tx(2, text, asciilookup, displayBytesLetters);
}
return;
}
As I debug line by line, the POSIF0 registers are not even changing as I assign each register its new value. Is the debugger not fully functional on the latest version of Dave or am I doing something wrong? Show Less
POSIF0 -> PRUNC = 0x03; // Stop and reset POSIF 0
// Quadrature Decode Mode Enable (FSEL)
// Direction Count Mode (QDCM)
// IN0B (0.13 BCOM) for Phase A (INSEL0)
// IN1A (1.1 ACOM) for Phase B (INSEL1)
// Max lowpass
POSIF0 -> PCONF = 0x70000101; // 0000 0000 0000 0000 0000 0001 0000 0101
POSIF0 -> PSUS = 0x00000000; // Use suspend mode defaults
// Phase A active high (PALS)
// Phase B active high (PBLS)
// Clockwise, Phase A (BCOM) leading (PHS)
POSIF0 -> QDC = 0x00000003;
POSIF0 -> PFLGE = 0x00000000; // Disable all POSIF 0 interrupts
Here are my clock settings:
SCU_GENERAL -> PASSWD = 0x000000C0; // Disable bit protection scheme
// Configure CCU40 Global Settings
CCU40 -> GCTRL = 0x00000000; // Use global control defaults
CCU40 -> GIDLC = 0x0000010F; // Bring all slices and prescaler out of idle
// Set up CCU4.1.0 to work with Rotary encoder control
CCU40_CC40 -> TCCLR = 0x00000007; // Stop and clear timer; clear dither counter.
CCU40_CC40 -> INS = 0x003F0455; // POSIF 1 CLK -> Event 0, 1, and 2; Event 1 rising edge enable only. 0001 0000 0100 0100 0100
CCU40_CC40 -> CMC = 0x00000001; // Event 0 -> start.
CCU40_CC40 -> TC = 0x00000402; // Set timer to one-shot mode, Event 0 clears and starts timer.
CCU40_CC40 -> PSC = 0x0000000D; // Set prescaler to divide by 8192.
CCU40_CC40 -> PRS = 20UL; // Set period shadow register to 50 (~5mS period).
CCU40_CC40 -> INTE = 0x00000001; // Enable counter interrupt on period match.
CCU40 -> GCSS = 0x00001111; // Initiate shadow transfer.
I then enable the interrupt CCU40_0:
NVIC_EnableIRQ(CCU40_0_IRQn);
I also am trying to capture any of the decoder values but nothing changes when I turn the rotary encoder. Values are always as follows corresponding to the order they are listed below: 0, 2, 4, 8.
current = POSIF_PDBG_QCSV_Pos; // Current position of encoder
previous = POSIF_PDBG_QPSV_Pos; // Previous position of encoder
ival = POSIF_PDBG_IVAL_Pos; // Current index of encoder
direction = POSIF_QDC_DVAL_Pos;
I have the interrupt functions declared and it should write text to an matrix display if entered:
void CCU40_0_IRQHandler(void){
int i;
for(i=0;i<100;i++){
serial_tx(2, text, asciilookup, displayBytesLetters);
}
return;
}
As I debug line by line, the POSIF0 registers are not even changing as I assign each register its new value. Is the debugger not fully functional on the latest version of Dave or am I doing something wrong? Show Less
XMC™
Hi.Now I have some problrms using CAN port of XMC4500(144-LQFP) and MDK-ARM 5(port1 : P1.4, P1.5 port2 : P2.6, P2.7 port3 : P1.8, P1.9).Transm...
Show More
Hi.
Now I have some problrms using CAN port of XMC4500(144-LQFP) and MDK-ARM 5
(port1 : P1.4, P1.5 port2 : P2.6, P2.7 port3 : P1.8, P1.9).
Transmitting to empty port(no node connected) ALERT bit of NSR register set(one)
and TEC value of NECNT register reach to 0x80.
Addtional transmission makes software upset.
How can I avoid software upset and how can I reset CAN port error without power off?
Please help me.
Best Regards. Show Less
Now I have some problrms using CAN port of XMC4500(144-LQFP) and MDK-ARM 5
(port1 : P1.4, P1.5 port2 : P2.6, P2.7 port3 : P1.8, P1.9).
Transmitting to empty port(no node connected) ALERT bit of NSR register set(one)
and TEC value of NECNT register reach to 0x80.
Addtional transmission makes software upset.
How can I avoid software upset and how can I reset CAN port error without power off?
Please help me.
Best Regards. Show Less
XMC™
Hello,I am using coin battery to backup hibernate domain, VBAT typical connection with two diodes, override with VDDP. Pins HIB IO 0,1 left unconnecte...
Show More
Hello,
I am using coin battery to backup hibernate domain, VBAT typical connection with two diodes, override with VDDP. Pins HIB IO 0,1 left unconnected. Are there any specific setting in registers be done to extend battery life? Do you have any recommendations?
rum Show Less
I am using coin battery to backup hibernate domain, VBAT typical connection with two diodes, override with VDDP. Pins HIB IO 0,1 left unconnected. Are there any specific setting in registers be done to extend battery life? Do you have any recommendations?
rum Show Less
XMC™
Hi. I am jong.I want to update firmware with SD card. and I am using XMC 4500.First, I wonder whether it can update firmware with SD card or not in no...
Show More
Hi. I am jong.
I want to update firmware with SD card. and I am using XMC 4500.
First, I wonder whether it can update firmware with SD card or not in normal boot mode.
Second, If I must select ASC boot mode or CAN boot mode, which one do I select ?
Third, To update firmware with SD card, What can I do? I want to know Function, Peripheral and correct method related SD Card update.
help. Show Less
I want to update firmware with SD card. and I am using XMC 4500.
First, I wonder whether it can update firmware with SD card or not in normal boot mode.
Second, If I must select ASC boot mode or CAN boot mode, which one do I select ?
Third, To update firmware with SD card, What can I do? I want to know Function, Peripheral and correct method related SD Card update.
help. Show Less
Trending discussions