XMC™ Forum Discussions
Hi everyone,
I'm trying to build a bootloader base on the tutorial of Infineon XMC4700 USBD Bootloader. I do everything in the tutorial but It doesn't work for me. ABM_0 header, linker script config,... I do all the same as the document below. Bootloader code is running, but when I upload application firmware at ABM_0 location in flash and then trigger software reset to enter the ABM_0, it just doesn't work. I check flash and see the uploaded ABM code is there in flash, but when trigger software system reset to enter ABM_0 mode, it doesn't work. Can anyone help me? I'm using P2G XMC4700 kit.
Show LessHi everyone,
I'm trying to modify linker script file to build my bootloader for XMC4700. I understanded some basic syntax in linkerscript but some of them are to strange to figure out.
In the SECTIONS region in my linker script has this part:
Hi
I try to demo CAN_TRANSMITTER on DAVE IDE.I debug successfully,then I use canalyst to check the message is failed.
I don't know wry the message send is failed. This is my code,please help me.
Thanks
#define CAN_FREQUENCY 144000000
#define CAN_TXD P2_0
#define CAN_RXD P14_3
const XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud =
{
.can_frequency = CAN_FREQUENCY,
.baudrate = 500000,
.sample_point = 8000,
.sjw = 1,
};
XMC_CAN_MO_t CAN_message =
{
.can_mo_ptr = CAN_MO0,
.can_priority = XMC_CAN_ARBITRATION_MODE_IDE_DIR_BASED_PRIO_2,
.can_identifier = 0xff,
.can_id_mask = 0xff,
.can_id_mode = XMC_CAN_FRAME_TYPE_STANDARD_11BITS,
.can_ide_mask = 1,
.can_data_length = 2,
.can_mo_type = XMC_CAN_MO_TYPE_TRANSMSGOBJ
.can_data = {0x11223344, 0x55667788},
};
int main(void)
{
/*Configure CAN Module*/
XMC_CAN_InitEx(CAN, XMC_CAN_CANCLKSRC_FPERI, CAN_FREQUENCY);
/*Configure CAN Node baudrate*/
XMC_CAN_NODE_NominalBitTimeConfigure(CAN_NODE0, &baud);
XMC_CAN_NODE_EnableConfigurationChange(CAN_NODE0);
XMC_CAN_NODE_SetInitBit(CAN_NODE0);
/* Configure CAN NODE input pin */
XMC_GPIO_SetMode(CAN_RXD, XMC_GPIO_MODE_INPUT_TRISTATE);
XMC_CAN_NODE_SetReceiveInput(CAN_NODE0, CAN_NODE0_RXD_P14_3);
/*Message Configuration*/
XMC_CAN_MO_Config(&CAN_message);
/*Allocate MO in Node List*/
XMC_CAN_AllocateMOtoNodeList(CAN, 1, 0);
XMC_CAN_NODE_DisableConfigurationChange(CAN_NODE0);
XMC_CAN_NODE_ResetInitBit(CAN_NODE0);
/* Configure CAN NODE output pin */
XMC_GPIO_SetMode(CAN_TXD, XMC_GPIO_MODE_OUTPUT_PUSH_PULL | P2_0_AF_CAN_N0_TXD);
XMC_CAN_MO_UpdateData(&CAN_message);
/* Send data in CAN_message */
XMC_CAN_MO_Transmit(&CAN_message);
}
Show Less
Hi everyone,
last topic with Mr @Owen_Su answers is closed so I have to create a new one to ask more about OTA update firmware of XMC4700. So the answer is I cannot update firmware OTA, but I can update OTA through UART right? Does anyone have example about update firmware through UART? My aim is to use another module transmit firmware through UART to XMC4700, XMC4700 handle it and update new firmware.
Show LessFor the "EVAL_3K3W_TP_PFC_SIC" evaluation board with XMC1404, a GUI tool for configuration is provided in the application note.
The evaluation board "EVAL_3K3W_TP_PFC_CC", which uses the XMC1402 and has similar features, does not mention a GUI tool in its application note.
Is the GUI tool available for this evaluation board?
As I understand about update firmware, we will need at least 3 firm stored in flash: bootloader, application firmware 1 and application firmware 2 for swapping. But I still don't know how to upload 3 firmware to flash? Because each time we upload code to MCU through Jlink, Flash is erase and reload. So how ew can stored multiple firmware on a single flash memory?
Show LessHello,
I'm trying to implement an AB encoder into a Dave app using the ENCODER_POSIF app.
The app itself looked promising. However, I didn't get any usage examples, the documentation only told me that it's been used for other apps for motor control.
I don't plan to control a motor, only get a rotation angle / counter from the AB signal.
Is it possible with this app alone? Or is it better to try it with the CCU module from scratch?
I did some experiments with the supplied functions like ENCODER_POSIF_GetRotorAngle(), but only got wildly counting values.
Any opinion on that?
Thanks!
Show LessI'm using P2G kit to develop a UART communication. I use FIFO buffer to transmit and receive UART Interrupt mode.
Ex:
UART_Receive(&UART_0, uart_instance.payloadISR, sizeof(uart_instance.payloadISR)); (payload is 5 bytes length). FIFO buffer 16 bytes.
I see in the comment of UART_Receive that FIFO buffer will be flushed after I receive full of my desire bytes (here is 5 bytes). But in practice I see that buffer is not flushed as expectec.
For example, I receive 5 bytes, communication is successful as expected. But when I receive 4 bytes, and next time sender send another msg with 5 bytes, 1 byte in the 2nd msg will be fill in the missing one in the 1st msg. Yeah it's ok at this part. But I expect that other 4 bytes remain in 2nd msg will be flushed, so when the 3rd msg with full 5 bytes arrive, it will not occur the situation like the 1st and 2nd msg. But I see that 3rd is still suffer that problem, and other msg continue the same, until the nth msg, everything is ok, 5 bytes receive correctly again (I do not know when the nth msg arrive, sometime it 4th, 8th,... it's not stable). Hope to hear the answer from you guys. Thanks.
How I can implement OTA update firmware on XMC4700? Does anyone have examples of this topic?
I am using the SPI to control a radio device. Transactions are either configurations (reading/writing register addresses), or radio buffer commands (reading/writing a FIFO).
I would like to use direct transfer mode for commands and reading from the FIFO, and DMA mode for writing to the FIFO.
Is it possible to configure DAVE to enable both SPI_MASTER_DIRECT_TRANSMIT_MODE and SPI_MASTER_DMA_TRANSMIT_MODE and selectively initiate transfers using the desired mode?
When writing to the FIFO using DMA the clocked SPI IN data (rx_data) is don't care.
When reading to from the FIFO only the initial read command needs to be valid and OUT data bytes are don't care (i.e. 0xff). For efficiency sake I would like to not have to fill a dummy data buffer but have the SPI automatically send the dummy byte for each clocked byte.
Show Less