Quantcast
Channel: Infineon Forums
Viewing all 9892 articles
Browse latest View live

TC23X ADC Read Issue.

$
0
0
I am facing issue while reading ADC_output buffer in below code. TC233
with below code,
Sometimes i get correct output but sometimes 1 and 2 are observed instead of correct values.


while( (Adc_17_GetStartupCalStatus()) != E_OK);
Adc_StartGroupConversion(AdcConf_AdcGroup_AdcGroup _02_ms);
while( (Adc_17_GetChannelStatus(0U)) != E_OK);
ADC_ReadStat = (Std_ReturnType)Adc_17_GetGroupResult(AdcConf_AdcG roup_AdcGroup_02_ms,data_array_ptr);
while( (ADC_ReadStat) != E_OK);
Adc_StopGroupConversion(AdcConf_AdcGroup_AdcGroup_ 02_ms);

Please help me with this issue.

Thanks

False pin Interrupt triggering due to noise

$
0
0
Hello,

I am using pin interrupt for detecting rising edge signal with large hysteresis.
When input signal is solid high then MCU gets rising edge pulse and it stays high all the time.
But when MCU gets falling edge signal it goes down for some time but then it gets noisey and moves up and down which triggers interrupt constantly.
My question is how can i filter this noise signal in software so that it will not trigger rising edge interrupt for noisy signal?
Attachment 3433
?????

XMC 1400 UART with Interrupt (in µVision not Dave)

$
0
0
Hello,
maybe someone can help me.
I am not using Dave, because we need to use Keil µVision.

We are trying to configure the UART, so it can work with Interrupts.
Without Interrupts the code works.

I tried to configure it in Dave and tried to find the important lines in the Dave generated code, but it is to big to understand for me.
In the internet there are not many Information about code for the XMC1400.

Can someone help me?
Best regards
Olli



void cUart0::init_UART0_int(void)
{
ConfigUart1.data_bits = 8U;
ConfigUart1.stop_bits = 1U;
ConfigUart1.baudrate = ASC1_BAUDRATE;

// Configure UART channel
XMC_UART_CH_Init(XMC_UART0_CH1, &ConfigUart1);

XMC_USIC_CH_SetInputSource(XMC_UART0_CH1, XMC_USIC_CH_INPUT_DX0, 0U);
XMC_USIC_CH_SetInputSource(XMC_UART0_CH1, XMC_USIC_CH_INPUT_DX3, 0U);
XMC_USIC_CH_SetInputSource(XMC_UART0_CH1, XMC_USIC_CH_INPUT_DX5, 0U);



// Configure Buffer:
XMC_USIC_CH_TXFIFO_Configure(XMC_UART0_CH1, 0, XMC_USIC_CH_FIFO_DISABLED, 0);
XMC_USIC_CH_RXFIFO_Configure(XMC_UART0_CH1, 0, XMC_USIC_CH_FIFO_DISABLED, 0);

// Configure pins
XMC_GPIO_SetMode(ASC1_TX, XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT7);
XMC_GPIO_SetMode(ASC1_RX, XMC_GPIO_MODE_INPUT_PULL_UP);



// conigure receive Interrupt :

// Set service request for transmit interrupt
XMC_USIC_CH_SetInterruptNodePointer(XMC_UART0_CH1, XMC_USIC_CH_INTERRUPT_NODE_POINTER_TRANSMIT_BUFFER , 1U);
// Set service request for receive interrupt
XMC_USIC_CH_SetInterruptNodePointer(XMC_UART0_CH1, XMC_USIC_CH_INTERRUPT_NODE_POINTER_RECEIVE, 0U); // von Dave
XMC_USIC_CH_SetInterruptNodePointer(XMC_UART0_CH1, XMC_USIC_CH_INTERRUPT_NODE_POINTER_ALTERNATE_RECEI VE, 0U); // von Dave
// XMC_USIC_CH_SetInterruptNodePointer(XMC_UART0_CH1, XMC_USIC_CH_INTERRUPT_NODE_POINTER_RECEIVE, 9U); // von Olli
// XMC_USIC_CH_SetInterruptNodePointer(XMC_UART0_CH1, XMC_USIC_CH_INTERRUPT_NODE_POINTER_ALTERNATE_RECEI VE, 9U); // von Olli
// Set service request for UART protocol events
XMC_USIC_CH_SetInterruptNodePointer(XMC_UART0_CH1, XMC_USIC_CH_INTERRUPT_NODE_POINTER_PROTOCOL, 2U);

// Set priority and enable NVIC node for transmit interrupt
NVIC_SetPriority((IRQn_Type)10, 3U);
XMC_SCU_SetInterruptControl(10U, XMC_SCU_IRQCTRL_USIC0_SR1_IRQ10);
NVIC_EnableIRQ((IRQn_Type)10);

// Set priority and enable NVIC node for receive interrupt
NVIC_SetPriority((IRQn_Type)9, 3U);
XMC_SCU_SetInterruptControl(9U, XMC_SCU_IRQCTRL_USIC0_SR0_IRQ9);
NVIC_EnableIRQ((IRQn_Type)9);

// XMC_USIC_CH_EnableEvent(XMC_UART0_CH1, (uint32_t)((uint32_t)XMC_USIC_CH_EVENT_STANDARD_RE CEIVE | (uint32_t)XMC_USIC_CH_EVENT_ALTERNATIVE_RECEIVE)); // NIO

// This function clears node 9 pending status
NVIC_ClearPendingIRQ(IRQ9_IRQn);


// Start UART channel
XMC_UART_CH_Start(XMC_UART0_CH1);
}
//



extern "C" void IRQ9_Handler(void)
{
Uart0.TX_Buffer.Data[50] = 'A'; // test: does it go into this int-Routine ?
Uart0.TransmitBytes(&Uart0.TX_Buffer.Data[50], 1);

//This function clears node 9 pending status
NVIC_ClearPendingIRQ(IRQ9_IRQn);

uint8_t rxData = 0x00;

//received_data = XMC_UART_CH_GetReceivedData(uart); // receive data
rxData = XMC_UART_CH_GetReceivedData(XMC_UART0_CH1);
Uart0.RX_Buffer.Data[Uart0.RX_Buffer.WritePos] = rxData;

Uart0.RX_Buffer.WritePos++;
if(Uart0.RX_Buffer.WritePos >= sizeof(Uart0.RX_Buffer.Data))
{
Uart0.RX_Buffer.WritePos = 0;
}

}
//

Trigger DMA on ECAT PDI event

$
0
0
Hi,

ECAT_SYNCx can be used as a trigger for the DMA channel if routed first through a CCU4x or CCU8x input multiplexer (ECAT_SYNCx->ERUx->CCU[48]x->DMA).
Otherwise you can trigger the DMA by software in the application code APPL_Application() function.

Regards,
Jesus

XMC1000 TIP of the day: Result FIFO for ADC channel

$
0
0
Hi,

attached two examples for the ADC FIFO usage.

I use the ADC in queue mode to do 4 samples.
The ADC is triggered via a CCU_PWM Timer.

Unfortunatelly the FIFO does't provide a FIFO Full interrupt so there are some options:

A) Implement a SW counter and read after 4 interrupts all 4 register.
B) Use QUEUE mode add the channel 4 times and activate for the last element the source event.
C) Use a HW timer or HW counter to define when you sampled 4 times.

I attached 2 projects, one for A) and one for B).

One hint for B): the APP uscases requires a conditional callback function for the source event. This can be optimized after the application is finilized.

Best Regards
Eric

XMC4500 for CAN Bus

$
0
0
Good afternoon,

I've to develope a CAN-Bus application. This is new for me and I'm looking
for an example code.
I found the tip to "AP32300_XMC4000_Multican_SW" but I didn't found it!

Could anybody help me?

Thanks & regards,
Bernd

make: *** No rule to make target `../XMCLib_UART_FIFO.ld', needed by `XMCLib_UART_FIF

$
0
0
As the title says,when I build the program under DAVE3.1.10,it replys the error above.
How could I solve this problem?Thank you.

multi channel mode

$
0
0
Hi,

attached an example for CCU8 Multichannel control based on XMC1300:

* This program shows the usage of Multi channel control.
* A 3 PWM are generated by CCU80.CC80, the outputs are P0.00,P0.01,P0.02
* The CCU40.CC42 is used to trigger an update of the MCM and reload via SW the MCMS in the period interrupt (called: sim_hall_isr).
* THE CCU40.CC41 is used as snyc. trigger, so that the update occurs immediately. Another option would be to use the CCU8 slice as sync trigger to avoid spikes.
*
* In the sim_hall_isr alternating Out01 and Out02 are blanked.
*
* The Digital OI APP is configured as push pull.
* To combine OUT01 and OUT02 externally it is mandatory to set the IO APPs to Open Train and add an external pull up resistor (~10kOhm)

Best Regards
Eric
?????

XMC4500 Relax Kit SPI FLASH MEMORY

XMC4500 Usb Visual Studio

$
0
0
Hello!

I'm trying to establish a communication between an XMC4500 and a computer (Windows) via USB. I downloaded the USB example from Infineon website and it comes with a software built in Visual Studio. Is there any possibility of sharing the visual studio project of that interface?

Attachment 3438

Thanks in advance.
Best Regards,
Persike.
?????

Connection closed by the GDB server - no source available for "0x0"

$
0
0
To anyone wondering, it happens to me when i'm using the Serial Wire debugger instead of the JTAG one, and i power OFF and then ON again the board.

The code starts running even if the debugger is still connected, and when i go into debug session it doesn't program the flash memory.

Solution I found is to unplug, then plug again the debugger while the board is OFF, then power on the board. The code doesn't autostart so I'm able to debug with no issues.
Hope this is helping someone.

HW Signal Connections of CCU_SLICE event_in0

$
0
0
Hi.

I am unable to connect the output ST of a CCU4_SLICE_CONFIG_x to "event_in0" input of another CCU4 SLICE_CONFIG_y.
I am using the HW Signal Connectios window, selcting CCU4_SLICE_CONFIG_x--> source Signal (ST),
connect to --> CCU4_SLICE_CONFIG_y, but in the Target Signal menu, it only appers in0, in1 and in2. However I expected to see in the
Target Signal menu, the "event_in0" that I create in the CCU4_SLICE_CONFIG_y and that already I can see in the HW Signal Connectivity.

Can anyone tell where is my mistake?
I would like to connect CCU4_SLICE_CONFIG_x-->ST, to CCU4_SLICE_CONFIG_y-->event_in0 to Start the timing of CCU4_SLICE_CONFIG_y.

Best regards.
Carlos.

XMC4800: Manually trigger low prio ISR from inside high prio ISR

$
0
0
Hello,
I need to trigger a low priority ISR (L_ISR) from inside an active high priority ISR (H_ISR).
This is done by manually setting the pending bit of L_ISR in the running H_ISR: NVIC_SetPendingIRQ(L_ISR)

H_ISR takes place every 4ms and contains only 5 simple assignments.
Device: XMC4800

What I do not understand is:
H_ISR > L_ISR: H_ISR is triggered continuously again instantaneously when H_ISR is finished.
L_ISR is not entered at all.

H_ISR < L_ISR (for testing):
H_ISR is triggered every 4ms and is interrupted by L_ISR as expected.

Any ideas why L_ISR > H_ISR works but H_ISR > L_ISR fails?

WAKE UP from Sleep Mode ( XMC1201 )

$
0
0
Hi everyone,

I have put my micro into sleep mode by disabling all the interrupts and using these (_WFI and _disable_irq ) instructions . I am not sure how to wake up my Micro from sleep mode by using interrupt.

Kindly give me some help and suggestions.

Thanks .

Where/how to get DEMO_5QR4770AG_15W1 evaluation board?

$
0
0
This is my first post and hopefully, I'm on right place to ask such sort of question: I'd like to deploy ICE5QR4770 quasi-resonant IC and would like to buy one DEMO_5QR4770AG_15W1 evaluation board to compare its behaviour with my design that has an issue with start up.
My problem is that I cannot identify a store/supplier who can offer that board.
Thanks in advance for any suggestion.

Dave 4.3.2 - remember files open?

$
0
0
Hello,

Apologies if this has been asked before - I searched & couldn't find anything.

How do I get Dave to remember / reload my open files? Right now I have a bunch of files open. I close Dave. I open Dave. And Dave starts up "blank" - I need to reload my files again. I've been trying all kinds of settings in the preferences menus with no luck.

Other Eclipse-based programs I use (eg Code Composer Studio from TI) don't have this problem; they start up with the same settings (files open etc) as when they were shut down. But I don't seem to be able to get Dave to remember this. I see this behavior on 2 different PCs.

Any tips would be appreciated. Thanks.

XE164 Uconnect eeprom ept file

$
0
0
I want to design the xe164 uconnect board, where can download the FTDI eeprom ept file for the board. thanks.

Distance detection example C++ project.

Is it possible to setup the EtherCAT port as a common Ethernet port running IP proto?

$
0
0
Hi friends,

I am wondering that it is possible to setup the EtherCAT ports as a common Ethernet port running IP protocol.
As I known, this is not a popular scenario, but I would like to develop a versatile product for both EtherCAT slave function and master function.
As an EtherCAT master, one port is used to transmit the master datagram and the other port is used to connect with other Modbus TCP devices.

BTW, I know the ABB MicroFlex servo driver can configure the first EtherCAT port as a common Ethernet port running their management protocol.

Many thanks,
Rui

Example for CCU8 Passive Level update with shaddow transfere

$
0
0
Hi all,

attached an example to change the passive level of an CCU8 slice.
The CCU8_SLICE_CONFIG is used to generate a PWM output.

OUT0 (P1.0) and OUT1(P0.5) is used for this example.

The passive level is periodicaly changed in an CCU4 interrupt.
The freuqncy of the CCU4 and CCU8 is asynchron. The Digital IO (P0.2) is toggled when the passive level change request is set.
This means the passiv level changes after next Period or one Match update.

Best Regards
Eric
Viewing all 9892 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>