DAVE™ Forum Discussions
DAVE™
Hey people i have a problem im from ardiuno ide and moved to dave which is 100% better but my prpblem seem to be bit read set and modify a individual ...
Show More
Hey people i have a problem im from ardiuno ide and moved to dave which is 100% better but my prpblem seem to be bit read set and modify a individual bit how do i do that with dave?
Reading Bits and setting individual Bits is what i wanna do thats my question i see in ardiuno they have bitread() can i use that? bitRead(x, n) would the x beconsider the register i wanna access and n would be the specific bit right i wanna read ??? How can i apply this to dave. Also i notice dave has spi recieve is that the same as reading a byte? Show Less
Reading Bits and setting individual Bits is what i wanna do thats my question i see in ardiuno they have bitread() can i use that? bitRead(x, n) would the x beconsider the register i wanna access and n would be the specific bit right i wanna read ??? How can i apply this to dave. Also i notice dave has spi recieve is that the same as reading a byte? Show Less
DAVE™
Hello,After upgrading DFP Libary fom v2.11 to 2.12.1 I observe my project using I2C devices on an XMC4500was not working anymore.After some investigat...
Show More
Hello,
After upgrading DFP Libary fom v2.11 to 2.12.1 I observe my project using I2C devices on an XMC4500
was not working anymore.
After some investigation, I found that that code for XMC_I2C_CH_SetBaudrateEx is probably wrong
Left side : wrong original, right side ( corrected version)
This is really frightening!! I really wonder how you test your library updates! Aparently badly.
A simple code review would have catched this.
😞
Jorge Show Less
After upgrading DFP Libary fom v2.11 to 2.12.1 I observe my project using I2C devices on an XMC4500
was not working anymore.
After some investigation, I found that that code for XMC_I2C_CH_SetBaudrateEx is probably wrong
Left side : wrong original, right side ( corrected version)
This is really frightening!! I really wonder how you test your library updates! Aparently badly.
A simple code review would have catched this.
😞
Jorge Show Less
DAVE™
Hi Infineon,is it possible to start 3 instances of DAVE on the same PC at the same time, using 3 independent JLink servers connected via 3 USB ports t...
Show More
Hi Infineon,
is it possible to start 3 instances of DAVE on the same PC at the same time, using 3 independent JLink servers connected via 3 USB ports to 3 debuggers connected to 3 targets? These 3 targets are connected via data links and I want to switch fast between the debuggers of the 3 targets when testing/debugging the whole system.
Or are 3 PCs needed?
Best Regards
Wolfgang Show Less
is it possible to start 3 instances of DAVE on the same PC at the same time, using 3 independent JLink servers connected via 3 USB ports to 3 debuggers connected to 3 targets? These 3 targets are connected via data links and I want to switch fast between the debuggers of the 3 targets when testing/debugging the whole system.
Or are 3 PCs needed?
Best Regards
Wolfgang Show Less
DAVE™
Hi There,
I am using Dave 4.4.2. I havenot found Dave SDK in downloaded zip file. How to develop Customised App?
I am using Dave 4.4.2. I havenot found Dave SDK in downloaded zip file. How to develop Customised App?
DAVE™
Hi,I'm using Distance2Go (XMC4200) kit and I'm trying to use UART.Unfortunately the sample code that the company offers is not working.Does anyone hav...
Show More
Hi,
I'm using Distance2Go (XMC4200) kit and I'm trying to use UART.
Unfortunately the sample code that the company offers is not working.
Does anyone have any code that works?
Attached is the code I used
I'm using Distance2Go (XMC4200) kit and I'm trying to use UART.
Unfortunately the sample code that the company offers is not working.
Does anyone have any code that works?
Attached is the code I used
Show Less
include
#include
/* Pins macro definition */
#define LED1 P2_1
#define UART_TX P0_1
#define UART_RX P0_0
/* Number of data to tx/rx and limits for the TX and RX FIFOs */
#define NUM_DATA 25
#define RX_FIFO_INITIAL_LIMIT 7
#define TX_FIFO_INITIAL_LIMIT 1
/* Initialization structures */
XMC_GPIO_CONFIG_t uart_tx =
{
.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2,
.output_strength = XMC_GPIO_OUTPUT_STRENGTH_MEDIUM
};
XMC_GPIO_CONFIG_t uart_rx =
{
.mode = XMC_GPIO_MODE_INPUT_TRISTATE
};
XMC_GPIO_CONFIG_t led =
{
.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL,
.output_strength = XMC_GPIO_OUTPUT_STRENGTH_MEDIUM
};
/* Initialization structure for both USIC0_CH0 and USIC0_CH1 channels */
XMC_UART_CH_CONFIG_t uart_config =
{
.data_bits = 8U,
.stop_bits = 1U,
.baudrate = 9600U
};
/* Global variables initialization. Tx and rx indexes and tx and rx arrays */
uint32_t tx_index=0;
uint32_t rx_index=0;
uint8_t tx_data[NUM_DATA];
uint16_t rx_data[NUM_DATA];
/* Transmit handling IRQ */
void USIC0_0_IRQHandler(void)
{
/* If still remaining data to be send */
if(tx_index < NUM_DATA)
{
/* Fill the TX FIFO till it is full */
while(!XMC_USIC_CH_TXFIFO_IsFull(XMC_UART0_CH0))
{
XMC_UART_CH_Transmit(XMC_UART0_CH0, tx_data[tx_index]);
tx_index++;
}
}
}
/* Receive handling IRQ */
void USIC1_1_IRQHandler(void)
{
/* Read the RX FIFO till it is empty */
while(!XMC_USIC_CH_RXFIFO_IsEmpty(XMC_UART1_CH0))
{
rx_data[rx_index++] = XMC_UART_CH_GetReceivedData(XMC_UART1_CH0);
}
/* If all the data have been received */
if(rx_index == (NUM_DATA))
{
/* Check if every received data match with the transmitted data */
for (int tmp=0; tmp{
/* If reception fails stays in an infinite while loop and switch off the LED */
if (tx_data[tmp]!=rx_data[tmp])
{
while(1)
{
XMC_GPIO_SetOutputLow(LED1);
}
}
else
{
/* If reception is successful switch on the LED */
XMC_GPIO_SetOutputHigh(LED1);
}
}
}
/* If the remaining data to be received is smaller than the initial RX FTFO Limit
* it is modified to the remaining data minus 1 in order react when we have all the data received*/
if((NUM_DATA-rx_index) < RX_FIFO_INITIAL_LIMIT)
{
XMC_USIC_CH_RXFIFO_SetSizeTriggerLimit(XMC_UART1_CH0, XMC_USIC_CH_FIFO_SIZE_8WORDS, (NUM_DATA-rx_index)-1);
}
}
int main(void)
{
/* USIC channels initialization */
XMC_UART_CH_Init(XMC_UART0_CH0, &uart_config);
XMC_UART_CH_Init(XMC_UART1_CH0, &uart_config);
/* Input multiplexer configuration for UART1_CH0 */
XMC_UART_CH_SetInputSource(XMC_UART1_CH0, XMC_UART_CH_INPUT_RXD, USIC1_C1_DX0_P0_0);
/* FIFOs initialization for both channels:
* 8 entries for TxFIFO from point 0, LIMIT=1
* 8 entries for RxFIFO from point 8, LIMIT=7 (SRBI is set if all 8*data has been received)
* */
XMC_USIC_CH_TXFIFO_Configure(XMC_UART0_CH0, 0, XMC_USIC_CH_FIFO_SIZE_8WORDS, TX_FIFO_INITIAL_LIMIT);
XMC_USIC_CH_RXFIFO_Configure(XMC_UART1_CH0, 8, XMC_USIC_CH_FIFO_SIZE_8WORDS, RX_FIFO_INITIAL_LIMIT);
/* Enabling events for TX FIFO and RX FIFO */
XMC_USIC_CH_TXFIFO_EnableEvent(XMC_UART0_CH0,XMC_USIC_CH_TXFIFO_EVENT_CONF_STANDARD);
XMC_USIC_CH_RXFIFO_EnableEvent(XMC_UART1_CH0,XMC_USIC_CH_RXFIFO_EVENT_CONF_STANDARD |
XMC_USIC_CH_RXFIFO_EVENT_CONF_ALTERNATE);
/* Connecting the previously enabled events to a Service Request line number */
XMC_USIC_CH_TXFIFO_SetInterruptNodePointer(XMC_UART0_CH0,XMC_USIC_CH_TXFIFO_INTERRUPT_NODE_POINTER_STANDARD,0);
XMC_USIC_CH_RXFIFO_SetInterruptNodePointer(XMC_UART1_CH0,XMC_USIC_CH_RXFIFO_INTERRUPT_NODE_POINTER_STANDARD,1);
XMC_USIC_CH_RXFIFO_SetInterruptNodePointer(XMC_UART1_CH0,XMC_USIC_CH_RXFIFO_INTERRUPT_NODE_POINTER_ALTERNATE,1);
/* Start USIC operation as UART */
XMC_UART_CH_Start(XMC_UART0_CH0);
XMC_UART_CH_Start(XMC_UART1_CH0);
/*Initialization of the necessary ports*/
XMC_GPIO_Init(UART_TX,&uart_tx);
XMC_GPIO_Init(UART_RX,&uart_rx);
XMC_GPIO_Init(LED1,&led);
/*Configuring priority and enabling NVIC IRQ for the defined Service Request line number */
NVIC_SetPriority(USIC0_0_IRQn,63U);
NVIC_EnableIRQ(USIC0_0_IRQn);
NVIC_SetPriority(USIC1_1_IRQn,62U);
NVIC_EnableIRQ(USIC1_1_IRQn);
USIC1_1_IRQHandler();
/* Filling the tx array */
for (uint32_t i = 0; i < NUM_DATA; i++)
{
tx_data=i;
}
/* Filling the the first time TX FIFO. Successive fillings will be done in the TX FIFO IRQ*/
while(!XMC_USIC_CH_TXFIFO_IsFull(XMC_UART0_CH0))
{
XMC_UART_CH_Transmit(XMC_UART0_CH0,tx_data[tx_index++]);
}
while(1)
{
/* Infinite loop */
}
}
DAVE™
Hi there,I need to start the oscilloscope in dave 4.4.2 . i have downloaded configured the same. but from where to add oscilloscope? please help.
Show More
Hi there,
I need to start the oscilloscope in dave 4.4.2 . i have downloaded configured the same. but from where to add oscilloscope? please help. Show Less
I need to start the oscilloscope in dave 4.4.2 . i have downloaded configured the same. but from where to add oscilloscope? please help. Show Less
DAVE™
Hi all,I am developing an electronic module incorporating an XMC4500 which needs to communicate five values onto the CAN bus of an automobile. From a...
Show More
Hi all,
I am developing an electronic module incorporating an XMC4500 which needs to communicate five values onto the CAN bus of an automobile. From a firmware viewpoint I have zero experience in this field and I would really appreciate any help on how to go about this.
Thank you very much
PHAB Show Less
I am developing an electronic module incorporating an XMC4500 which needs to communicate five values onto the CAN bus of an automobile. From a firmware viewpoint I have zero experience in this field and I would really appreciate any help on how to go about this.
Thank you very much
PHAB Show Less
DAVE™
Hello,I am using XMC4500 microcontroller to develop a power electronic project.I need to use multi-channel ADC+DMA in DAVE4 IDE.As I search in this fo...
Show More
Hello,
I am using XMC4500 microcontroller to develop a power electronic project.
I need to use multi-channel ADC+DMA in DAVE4 IDE.
As I search in this forum, there is no topic that exactly answering my problem.
Is there any solution for my problem?
Thank in advance,
Ade Pratama Show Less
I am using XMC4500 microcontroller to develop a power electronic project.
I need to use multi-channel ADC+DMA in DAVE4 IDE.
As I search in this forum, there is no topic that exactly answering my problem.
Is there any solution for my problem?
Thank in advance,
Ade Pratama Show Less