From 56e0c6eaaafa9ae1941f7cd73649505c44055528 Mon Sep 17 00:00:00 2001 From: zhanglinjing Date: Mon, 15 Jan 2024 14:09:24 +0100 Subject: [PATCH] clean up code --- XMC14002GO_TEST.md | 46 ------------------- .../config/XMC1400_XMC2GO/pins_arduino.h | 9 +--- 2 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 XMC14002GO_TEST.md diff --git a/XMC14002GO_TEST.md b/XMC14002GO_TEST.md deleted file mode 100644 index ff073aad..00000000 --- a/XMC14002GO_TEST.md +++ /dev/null @@ -1,46 +0,0 @@ -### Examples Supported - -| Example | XMC1400 2GO test | Description | -| ----------- | ----------- |------------ -| DieTemperatureMeasurement                                                                                                                 | PASS (serial delay) |Simple die temperature measurement for XMC devices which demonstrates the measure temperature of die using sensor. | -| HeapMemoryMeasurement | PASS (serial delay) | Simple example to check heap memory during run time for XMC devices which demonstrates the ability to check on free heap memory. | -|SleepModeXMC1100 | PASS | Demonstrates the use of an alarm to wake up an xmc1100 from sleep mode. | -|SleepModeXMC4700 | N/A | Simple Sleep Mode for XMC4700 Relax Kit V1 demonstrates the use of an alarm to wake up an XMC4700 from sleep mode.LED2 will blink fast on active mode. If CCU4 is ON in sleep mode, LED2 will blink slower (because of slower clock) while in sleep mode.If CCU is OFF in sleep mode, LED2 will stop blinking, until device wakes up. -|StackMemoryMeasurement | FAIL: linker file variable name changed| Simple example to check stack memory during run time for XMC devices which demonstrates the ability to check on free stack memory - -## DMA - -### Examples Supported -| Example | XMC1400 2GO test | Description | -| --------- | ----------- | -------------- -| DMA_Memory                                                                        | N/A     | Demonstrates how to setup an DMA, to transfer data between two places in memory.| -|DMA_UART | N/A | Demonstrates how to setup an DMA, to transfer data between two places in memory.| - - -## RTC Library -| Example | XMC1400 2GO test | Description | -| ----------- | ----------- |------------ -|AlarmRTC                                                               | N/A    | Demonstrates how to set an RTC alarm for the XMC4700 Relax Kit V1| -|SimpleRTC | N/A | Demonstrates the use of the RTC library for the XMC4700| - -## SPI Library -| Example | XMC1400 2GO test | Description | -| ----------- | ----------- |------------ -|SPI_MOSI_to_MISO_SameDevice                         | PASS (serial problem same as XMC1100 2Go) | SPI example which communicates between the MOSI and MISO pin of the same board. Connect the MOSI pin to the MOSI pin as hardware setup.| - -## Wire Library -Test with TLV493 1A6: PASS - -| Example | XMC1400 2GO test | Description | -| ----------- | ----------- |------------ -| master_reader                                                                                                                                                                                                                                                                                      | | Demonstrates use of the Wire library. Reads data from an I2C/TWI slave device. Refer to the "Wire Slave Sender" example for use with this.Then it communicates using I2C protocol between two supported XMC boards. Connect the SDA and SCL pins of one board to the SDA and SCL pin of the other board. -| master_writer | | Demonstrates use of the Wire library.Writes data to an I2C/TWI slave device. Refer to the "Wire Slave Receiver" example for use with this.Then it communicates using I2C protocol between two supported XMC boards. Connect the SDA and SCL pins of one board to the SDA and SCL pin of the other board. -| slave_receiver | | Demonstrates use of the Wire library. Receives data as an I2C/TWI slave device. Refer to the "Wire Master Writer" example for use with this.Then it communicates using I2C protocol between two supported XMC boards. Connect the SDA and SCL pins of one board to the SDA and SCL pin of the other board. -| slave_sender | | Demonstrates use of the Wire library. Sends data as an I2C/TWI slave device. Refer to the "Wire Master Reader" example for use with this.Then it communicates using I2C protocol between two supported XMC boards. Connect the SDA and SCL pins of one board to the SDA and SCL pin of the other board. - -## I2S Library -It works now, but with example overflow issue - -## OneWire Library - - diff --git a/variants/XMC1400/config/XMC1400_XMC2GO/pins_arduino.h b/variants/XMC1400/config/XMC1400_XMC2GO/pins_arduino.h index c2fe4970..b597f4e5 100644 --- a/variants/XMC1400/config/XMC1400_XMC2GO/pins_arduino.h +++ b/variants/XMC1400/config/XMC1400_XMC2GO/pins_arduino.h @@ -70,12 +70,11 @@ extern const uint8_t NUM_ANALOG_INPUTS; #define SERIAL_DEBUG 1 #endif -// TODO: Verify the CCU frequency // Generate 490Hz @fCCU=1MHz #define PWM4_TIMER_PERIOD (2041U) -// TODO: Verify the PCLK, XMC_CCU4_SLICE_PRESCALER_64 -#define PCLK 64000000u +// PCLK = 2 * MCLK +#define PCLK 96000000u // Define SPI pin #define PIN_SPI_SS 3 @@ -107,7 +106,6 @@ extern const uint8_t NUM_ANALOG_INPUTS; #define LED2 15 #define LED_BUILTIN LED1 -// TODO: check Interrupt /* Mapping interrupt handlers. Notice that XMC1400 can have interrupt handlers working in 3 modes, the defines below assumes the mode A. For details refer to assembly file and reference manual. */ @@ -299,8 +297,6 @@ XMC_SPI_t XMC_SPI_0 = } }; - -// TODO: I2C XMC_I2C_t XMC_I2C_0 = { .channel = XMC_I2C0_CH1, @@ -334,7 +330,6 @@ XMC_I2C_t XMC_I2C_0 = .protocol_irq_service_request = 5 }; -// TODO: I2S XMC_I2S_t i2s_config = { .input_config = {