-
Notifications
You must be signed in to change notification settings - Fork 62
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
Enable XMC1400 Kit for Arduino board into the Arduino IDE #190
Enable XMC1400 Kit for Arduino board into the Arduino IDE #190
Conversation
…400 Kit for Arduino
IN general good suggest a modification for simplicity now and in future maintainability. CURRENTLY only the XMC1100 and XMC1400 Boot Kits have a GPIO pin assigned for Reset interrupt routing, instead of continually modifying core files, try adding TWO DEFINES to the pins_arduino.h for each of these boards
Change Main.cpp and reset.c (and any other place to use
Use GPIO_RESET_PIN to access which port and pin to use for any operations if needed now or in future.. This simplifies readablity and maintainability of code. While at it remove from reset.c
add instead
In reset.h remove
This removes circular fetches and reset.h is mainly referenced in Arduino.h anyway. Basically .cpp and .c files should include <Arduino.h> where as .h files should NOT reference it to avoid circular references and unnecessary fetches and disk activity. Majority of cores .h files are included by Arduino.h . Anything that calls any cores .h file should be called from Arduino.h or from a .c/.cpp module that has ALREADY included Arduino.h FIRST or after gcc standard includes |
Has the information been put together for the addition to the Wiki as well ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments in discussion and on files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further issues noted see my wiki on this and read it carefully including suggested pin number
https://github.com/techpaul/XMC-for-Arduino/wiki/XMC1400-Arduino-Kit-Pinout-and-Issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all these pins potential issues are due to the typos in documentation.
All rest looks fine to me prior on target testing 👍
I have a physical board here and I would not even attempt at testing here. Side note please do not use INTERNAL resources to Infineon on Github as per initial pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the hardware as well and did not have any issues, only the mismatching of the silkscreen, which you've addressed already and the comment I left you regarding the AD_AUX or AUX_AD
@boramonideep @jaenrig-ifx To follow the Hardware and Software Arduino pin referenceing WHATEVER the ID says Pin 2 and 3 MUST be interrupts NOT arduino pin 26. This means om ANY board with the same connectors especially the XMC boards the same shield and SOFTWARE will work the same WITHOUT MODIFICATION !! By having interrupt on Arduino pin 26 you have BROKEN the Arduino Uno Shieled R3 compatability. The idents are the LEAST of your worries. The pin order in software to match order on connectors matter regardless of ident. You change the definition of pin 2 and 3 to match what SHOULD happen NOT the ident or amy other weird method. In Arduino NOBODY use P1.4 referencing, they use Arduino pin wiring definitions So the ident is wrong, you obviously understand little about the arduino structure I also agree with @djaumann ) about putting comments about AD_AUX1 to AD_AUX_n Also as commented above you need to instigate a board agnostic method of reset pin handling as in #define HAS_GPIO_RESET This is a minimalistic approach to adding support, as in it works if you stand on one leg with your arm behind your back singing "Yankee doodle dandy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still things BROKEN and still things that need better implementation
@@ -26,7 +26,7 @@ | |||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
*/ | |||
#include <reset.h> | |||
#ifdef XMC1100_Boot_Kit | |||
#if defined(XMC1100_Boot_Kit) || defined(XMC1400_Arduino_Kit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to board agnostic method here using define in pins_arduino.h (also on XMC1100 Boot Kit)
#define HAS_GPIO_RESET
so
#ifdef HAS_GPIO_RESET
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as before when you change from ONE to more you put in a better solution AT THAT point
Thanks for the comment. Since now P0.5 appears at the Pin 2 location, it was tried to route INT0 through it but in vain. Hence, pin 3 (P1.1) had to named INT0 and pin 26 (P1.4) as INT1. We understand that this is not compatible with the Arduino Uno Rev3 Form Factor, but this was the only way forward. |
I see you have merged this into develop I do hope someone gets time to tidy up this mess and laziness. I was thing of using the board on a project as obviously the hardware and documentation were released before proper checks and this has now been rushed through I will have to use different micros/board on a paying project. I do not have time at present to fix your mess |
By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---
CONTRIBUTING.md also tells you what to expect in the PR process.
Description
This adds the XMC 1400 Kit for Arduino board into the XMC for Arduino BSP
Related Issue
#189 on github
Context
Please refer to internal ticket https://jirard.intra.infineon.com/browse/DESMAKERS-2490