Skip to content

Commit 58528a6

Browse files
committed
Revert "update table in readme"
This reverts commit 5866d18.
1 parent 8ce90a6 commit 58528a6

File tree

6 files changed

+120
-47
lines changed

6 files changed

+120
-47
lines changed

README.md

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,40 @@ In this table you find an overview of the Arduino cores the tests are currently
1010
- :x: indicates the test needs to be implemented on the platform or modified to run on the platform.
1111
- :no_entry_sign: indicates the test is not relevant for the platform.
1212

13-
| Test | XMC3.x-XMC14002go | XMC3.x-XMC4700 | XMC4.x-XMC14002go | XMC4.x-XMC4700 |
14-
|--------------------------------|:--------------------:|:--------------------:|:--------------------:|:--------------------:|
15-
| analogio_adc | :white_check_mark: | :white_check_mark: | :question: | :question: |
16-
| analogio_dac | :no_entry_sign: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
17-
| analogio_pwm | :x: | :white_check_mark: | :question: | :question: |
18-
| can_connected2_node1 | :white_check_mark: | :question: | :question: | :question: |
19-
| can_connected2_node2 | :white_check_mark: | :x: | :question: | :question: |
20-
| can_single | :x: | :x: | :question: | :question: |
21-
| digitalio_single | :white_check_mark: | :white_check_mark: | :question: | :question: |
22-
| interrupts_single | :x: | :white_check_mark: | :question: | :question: |
23-
| pulse_board1 | :white_check_mark: | :white_check_mark: | :question: | :question: |
24-
| pulse_board2 | :white_check_mark: | :white_check_mark: | :question: | :question: |
25-
| random | :white_check_mark: | :white_check_mark: | :question: | :question: |
26-
| spi_connected1_loopback | :x: | :x: | :question: | :question: |
27-
| spi_connected2_masterpingpong | :x: | :x: | :question: | :question: |
28-
| spi_connected2_slavepingpong | :x: | :x: | :question: | :question: |
29-
| time_single | :x: | :x: | :question: | :question: |
30-
| tone_no_tone | :x: | :x: | :question: | :question: |
31-
| uart_connected2_rx | :no_entry_sign: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
32-
| uart_connected2_tx | :no_entry_sign: | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
33-
| uart_rx | :no_entry_sign: | :x: | :no_entry_sign: | :no_entry_sign: |
34-
| uart_tx | :no_entry_sign: | :x: | :no_entry_sign: | :no_entry_sign: |
35-
| wifi_ap | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
36-
| wifi_client | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
37-
| wifi_exceptions | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
38-
| wifi_extras | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
39-
| wifi_server | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
40-
| wifi_sta | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
41-
| wifi_udp_client | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
42-
| wifi_udp_server | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: |
43-
| wire_connected1_pingpong | :x: | :white_check_mark: | :question: | :question: |
44-
| wire_connected2_masterpingpong | :white_check_mark: | :white_check_mark: | :question: | :question: |
45-
| wire_connected2_slavepingpong | :white_check_mark: | :white_check_mark: | :question: | :question: |
13+
| Test | PSOC6 | XMC3.x | XMC4.x |
14+
|--------------------------------|:--------------------:|:-------------------:|:-------------------:|
15+
| analogio_adc | :white_check_mark: | :question: | :question: |
16+
| analogio_dac | :white_check_mark: | :question: | :question: |
17+
| analogio_pwm | :white_check_mark: | :question: | :question: |
18+
| can_connected2_node1 | :no_entry_sign: | :white_check_mark: | :question: |
19+
| can_connected2_node2 | :no_entry_sign: | :white_check_mark: | :question: |
20+
| can_single | :no_entry_sign: | :white_check_mark: | :question: |
21+
| digitalio_single | :white_check_mark: | :white_check_mark: | :question: |
22+
| interrupts_single | :white_check_mark: | :question: | :question: |
23+
| onewire_DS18x20 | :white_check_mark: | :white_check_mark: | :question: |
24+
| pulse_board1 | :white_check_mark: | :question: | :question: |
25+
| pulse_board2 | :white_check_mark: | :question: | :question: |
26+
| random | :white_check_mark: | :question: | :question: |
27+
| spi_connected1_loopback | :white_check_mark: | :question: | :question: |
28+
| spi_connected2_masterpingpong | :white_check_mark: | :question: | :question: |
29+
| spi_connected2_slavepingpong | :white_check_mark: | :question: | :question: |
30+
| time_single | :white_check_mark: | :question: | :question: |
31+
| tone_no_tone | :white_check_mark: | :question: | :question: |
32+
| uart_connected2_rx | :white_check_mark: | :question: | :question: |
33+
| uart_connected2_tx | :white_check_mark: | :question: | :question: |
34+
| uart_rx | :white_check_mark: | :question: | :question: |
35+
| uart_tx | :white_check_mark: | :question: | :question: |
36+
| wifi_ap | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
37+
| wifi_client | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
38+
| wifi_exceptions | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
39+
| wifi_extras | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
40+
| wifi_server | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
41+
| wifi_sta | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
42+
| wifi_udp_client | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
43+
| wifi_udp_server | :white_check_mark: | :no_entry_sign: | :no_entry_sign: |
44+
| wire_connected1_pingpong | :white_check_mark: | :white_check_mark: | :question: |
45+
| wire_connected2_masterpingpong | :white_check_mark: | :white_check_mark: | :question: |
46+
| wire_connected2_slavepingpong | :white_check_mark: | :white_check_mark: | :question: |
4647

4748
## Pre-conditions
4849
Before running Unity tests, please ensure the following pre-conditions are met:

src/corelibs/analogio/test_analogio_pwm.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ void feedback_interrupt_handler() {
4444
if (start_time > 0) { // Ensure this is not the first edge
4545
low_time = current_time - start_time; // Measure LOW time (previous cycle)
4646
}
47-
4847
start_time = current_time; // Update start_time for HIGH period
4948
} else {
5049
// Falling edge detected
5150
high_time = current_time - start_time; // Measure HIGH time
5251
start_time = current_time; // Update start_time for LOW period
53-
52+
5453
// Indicate that we have captured a full PWM cycle (HIGH + LOW)
5554
high_measured = true;
5655
}
@@ -61,7 +60,7 @@ void feedback_interrupt_handler() {
6160
*/
6261
void feedback_measurement_handler() {
6362
uint32_t t_period;
64-
63+
6564
// Wait until a full PWM cycle has been measured
6665
while (!high_measured);
6766

@@ -87,7 +86,6 @@ void feedback_measurement_handler() {
8786
* @brief Suite setup function, runs before test suite execution begins.
8887
*/
8988
static void analogio_pwm_suite_setup() {
90-
9189
pinMode(PWM_PIN_FEEDBACK, INPUT);
9290
attachInterrupt(digitalPinToInterrupt(PWM_PIN_FEEDBACK), feedback_interrupt_handler, CHANGE);
9391
}
@@ -226,8 +224,7 @@ TEST_IFX(analogio_pwm, test_analog_write_pwm_12_bit_resolution)
226224
*/
227225
TEST_IFX(analogio_pwm, test_analog_write_pwm_16_bit_resolution)
228226
{
229-
analogWriteResolution(16);
230-
227+
analogWriteResolution(20); // Any value greater than 12 will be considered as 16-bit resolution
231228

232229
// Array of expected duty cycle percentages and their corresponding analogWrite values (16-bit resolution, 0 to 65535)
233230
const float expected_duty_cycles[] = {25.0f, 50.0f, 75.0f};

src/corelibs/interrupts/test_interrupts_single.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include "test_common_includes.h"
99
#include "test_config.h"
10-
typedef int PinStatus;
10+
1111
// Defines
1212
#define TRACE_OUTPUT
1313
// Variables

src/corelibs/pulse/test_pulse_board1.cpp

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @details This test suite verifies the functionality of the `pulseIn` and `pulseInLong` APIs.
55
* The test requires TEST_PIN_PULSE of board1 connected to the TEST_PIN_PULSE board2 and additionally
6-
* TEST_PIN_SYNC_IO of board1 connected to the TEST_PIN_SYNC_IO board2 inorder to synchronize the pulse
6+
* TEST_PIN_SYNC_IO of board1 connected to the TEST_PIN_PULSE board2 inorder to synchronize the pulse
77
* generation and measurement.
88
*
99
* @note The board1 test shall be started first before the board2 tests for proper synchronization.
@@ -97,6 +97,47 @@ TEST_IFX(pulse_board1, test_low_pulse_duration) {
9797

9898
}
9999

100+
/**
101+
* @brief Test case: Measure HIGH pulse duration.
102+
*/
103+
TEST_IFX(pulse_board1, test_high_pulse_long_duration) {
104+
const unsigned long test_duration_us = 1000; // 1 ms pulse
105+
106+
107+
while (digitalRead(TEST_PIN_SYNC_IO) == LOW) {}
108+
109+
delay(100);
110+
111+
// Generate a HIGH pulse
112+
digitalWrite(TEST_PIN_PULSE, HIGH);
113+
delayMicroseconds(test_duration_us);
114+
digitalWrite(TEST_PIN_PULSE, LOW);
115+
116+
while (digitalRead(TEST_PIN_SYNC_IO) == HIGH) {}
117+
118+
}
119+
120+
/**
121+
* @brief Test case: Measure LOW pulse duration.
122+
*/
123+
TEST_IFX(pulse_board1, test_low_pulse_long_duration) {
124+
const unsigned long test_duration_us = 2000; // 2 ms pulse
125+
126+
// Generate a LOW pulse
127+
digitalWrite(TEST_PIN_PULSE, HIGH);
128+
delayMicroseconds(1000); // Add a HIGH pulse before LOW
129+
130+
while (digitalRead(TEST_PIN_SYNC_IO) == LOW) {}
131+
delay(100);
132+
133+
digitalWrite(TEST_PIN_PULSE, LOW);
134+
delayMicroseconds(test_duration_us);
135+
digitalWrite(TEST_PIN_PULSE, HIGH);
136+
137+
138+
while (digitalRead(TEST_PIN_SYNC_IO) == HIGH) {}
139+
140+
}
100141

101142
/**
102143
* @brief Test case: Timeout when no pulse is detected.
@@ -185,6 +226,8 @@ TEST_GROUP_RUNNER(pulse_board1) {
185226

186227
RUN_TEST_CASE(pulse_board1, test_high_pulse_duration);
187228
RUN_TEST_CASE(pulse_board1, test_low_pulse_duration);
229+
RUN_TEST_CASE(pulse_board1, test_high_pulse_long_duration);
230+
RUN_TEST_CASE(pulse_board1, test_low_pulse_long_duration);
188231
RUN_TEST_CASE(pulse_board1, test_pulse_timeout);
189232
RUN_TEST_CASE(pulse_board1, test_short_pulse_duration);
190233
RUN_TEST_CASE(pulse_board1, test_long_pulse_duration);

src/corelibs/pulse/test_pulse_board2.cpp

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @details This test suite verifies the functionality of the `pulseIn` and `pulseInLong` APIs.
55
* The test requires TEST_PIN_PULSE of board1 connected to the TEST_PIN_PULSE board2 and additionally
6-
* TEST_PIN_SYNC_IO of board1 connected to the TEST_PIN_SYNC_IO board2 inorder to synchronize the pulse
6+
* TEST_PIN_SYNC_IO of board1 connected to the TEST_PIN_PULSE board2 inorder to synchronize the pulse
77
* generation and measurement.
88
*
99
* @note The board1 test shall be started first before the board2 tests for proper synchronization.
@@ -90,6 +90,41 @@ TEST_IFX(pulse_board2, test_low_pulse_duration) {
9090
TEST_ASSERT_FLOAT_WITHIN(tolerance, test_duration_us, measured_pulse_us);
9191
}
9292

93+
/**
94+
* @brief Test case: Measure HIGH pulse duration.
95+
*/
96+
TEST_IFX(pulse_board2, test_high_pulse_long_duration) {
97+
const unsigned long test_duration_us = 1000; // 1 ms pulse
98+
99+
digitalWrite(TEST_PIN_SYNC_IO, HIGH);
100+
101+
// Measure the pulse duration
102+
measured_pulse_us = pulseInLong(TEST_PIN_PULSE, HIGH);
103+
104+
digitalWrite(TEST_PIN_SYNC_IO, LOW);
105+
106+
// Validate the pulse duration within tolerance
107+
float tolerance = TOLERANCE_DURATION_PERCENTAGE * test_duration_us / 100.0f;
108+
TEST_ASSERT_FLOAT_WITHIN(tolerance, test_duration_us, measured_pulse_us);
109+
110+
}
111+
112+
/**
113+
* @brief Test case: Measure LOW pulse duration.
114+
*/
115+
TEST_IFX(pulse_board2, test_low_pulse_long_duration) {
116+
const unsigned long test_duration_us = 2000; // 2 ms pulse
117+
118+
digitalWrite(TEST_PIN_SYNC_IO, HIGH);
119+
120+
// Measure the LOW pulse duration
121+
measured_pulse_us = pulseInLong(TEST_PIN_PULSE, LOW, TIMEOUT_MICROSECONDS);
122+
123+
digitalWrite(TEST_PIN_SYNC_IO, LOW);
124+
125+
float tolerance = TOLERANCE_DURATION_PERCENTAGE * test_duration_us / 100.0f;
126+
TEST_ASSERT_FLOAT_WITHIN(tolerance, test_duration_us, measured_pulse_us);
127+
}
93128

94129
/**
95130
* @brief Test case: Timeout when no pulse is detected.
@@ -165,6 +200,8 @@ TEST_GROUP_RUNNER(pulse_board2) {
165200

166201
RUN_TEST_CASE(pulse_board2, test_high_pulse_duration);
167202
RUN_TEST_CASE(pulse_board2, test_low_pulse_duration);
203+
RUN_TEST_CASE(pulse_board2, test_high_pulse_long_duration);
204+
RUN_TEST_CASE(pulse_board2, test_low_pulse_long_duration);
168205
RUN_TEST_CASE(pulse_board2, test_pulse_timeout);
169206
RUN_TEST_CASE(pulse_board2, test_short_pulse_duration);
170207
RUN_TEST_CASE(pulse_board2, test_long_pulse_duration);

src/corelibs/tone/test_tone_no_tone.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#define TONE_PIN_OUTPUT TEST_PIN_DIGITAL_IO_OUTPUT
1919
#define TONE_PIN_FEEDBACK TEST_PIN_DIGITAL_IO_INPUT
2020

21-
typedef int PinStatus;
22-
2321
// Variables
2422
volatile uint32_t current_time = 0; // Timestamp of the last rising/falling edge
2523
volatile uint32_t start_time = 0; // Timestamp of the last rising edge
@@ -89,7 +87,6 @@ void feedback_measurement_handler_frequency() {
8987

9088
// Wait until a full PWM cycle has been measured
9189
while (!tone_measured);
92-
9390

9491
// Disable interrupts temporarily to avoid race conditions
9592
noInterrupts();
@@ -108,10 +105,8 @@ void feedback_measurement_handler_frequency() {
108105
* @brief Suite setup function, runs before test suite execution begins.
109106
*/
110107
static void tone_no_tone_suite_setup() {
111-
112108
pinMode(TONE_PIN_FEEDBACK, INPUT);
113109
attachInterrupt(digitalPinToInterrupt(TONE_PIN_FEEDBACK), feedback_interrupt_handler, CHANGE);
114-
115110
}
116111

117112
/**

0 commit comments

Comments
 (0)