Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop repeat of 183 into master by mistake #184

Merged
merged 6 commits into from
May 22, 2022
Merged

Develop repeat of 183 into master by mistake #184

merged 6 commits into from
May 22, 2022

Conversation

techpaul
Copy link
Contributor

Whilst looking at Issue #182 about X1 and X2 connectors on XMC4700 Relax Kit I discovered many areas of errors in how parts of the pins_arduino.h were constructed as well as support manuals and other documentation.

To improve maintainability (and porting future boards) the following restructuring has been done

Move all sections about types of peripherals together in same order
e.g. All PWM4 definitions together followed by PWM8

Generally order is

constants
Digital I/O
Interrupts
PWM
DAC
ADC
UART

Change some #define constants to const uint8_t whose value is calculated at compile time by the compiler, avoiding many mismatches. In particular from number of elements in a mapping array -

NUM_DIGITAL
GND
NUM_PWM4
NUM_PWM8
NUM_PWM
NUM_INTERRUPT
NUM_ANALOG_INPUTS
NUM_ANALOG_OUTPUTS

Change tests example testdefines.ino to access all these constants and test on as many boards as possible to test changes and give way for new boards to test capabilities.
This example is located in repository folder tests.

NOTES

ALL boards have had a test compile, and some boards have had testdefines.ino tested on them.

XMC4400 Platform2Go has MANY errors and bad duplications in its pins_arduino.h as well as its documentation, and need Infineon staff to update to be more usable.
Starting with PWM5 on Arduino pin 11, will function on pin 27, many other mismatches and pin duplications.

XMC4700 Relax Kit pins_arduino.h has a DUPLICATE Arduino pin for the SAME physical pin. Pin 23 (no physical pin) and Pin 97 on X2-2, which is confirmed by examining PCB file.

Related Issue
If you opened an issue before creating the PR, point to it here.

Context
What do we need to know about your development environment, tools, target, and so on. Screenshots are always helpful if there is a UI element to this PR.

Clean up historic malformed JSON that does not work with arduino-cli
Files to be linked from Wiki only
Whilst looking at Issue #182 about X1 and X2 connectors on XMC4700 Relax Kit I discovered any
areas of errors in how parts of the pins_arduino.h were constructed as well as support manuals and other documentation.

To improve maintainability (and porting future boards) the following restructuring has been done

1.  Move all sections about types of peripherals together in same order
    e.g. All PWM4 definitions together followed by PWM8

    Generally order is

        constants
        Digital I/O
        Interrupts
        PWM
        DAC
        ADC
        UART

2.  Change some #define constants to const uint8_t whose value is calculated at compile time by the compiler, avoiding many mismatches. In particular

        NUM_DIGITAL
        GND
        NUM_PWM4
        NUM_PWM8
        NUM_PWM
        NUM_INTERRUPT
        NUM_ANALOG_INPUTS
        NUM_ANALOG_OUTPUTS

   From number of elements in a mapping array.

3. Change tests example testdefines.ino to access all these constants and test on as many boards as possible to test changes and give way for new boards to test capabilities.
   This example is located in repository folder tests.

NOTES
a. ALL boards have had a test compile, and some boards have had testdefines.ino tested on them.

b. XMC4400 Platform2Go has MANY errors and bad duplications in its pins_arduino.h as well as its documentation, and need Infineon staff to update to be more usable.
   Starting with PWM5 on Arduino pin 11, will function on pin 27, many other mismatches and pin duplications.

c. XMC4700 Relax Kit pins_arduino.h has a DUPLICATE Arduino pin for the SAME physical pin. Pin 23 (no physical pin) and Pin 97 on X2-2, which is confirmed by examining PCB file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant