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

XMC4700 Relax Kit: Initial working commit #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ramangopalan
Copy link

Initial working commit for the Infineon XMC4700 Relax Kit.

@technoblogy
Copy link
Owner

Great! Thanks for this. How do you program it; is it possible to program it through the Arduino IDE? Also, is there an Arduino Core for the XMC4700? If not, how do you handle the Arduino functions such as pinmode and digitalwrite?

@ramangopalan
Copy link
Author

Great! Thanks for this. How do you program it; is it possible to
program it through the Arduino IDE? Also, is there an Arduino Core

Yes. I used the Arduino IDE to program it. The core for the XMC
devices is maintained here [1].

for the XMC4700? If not, how do you handle the Arduino functions
such as pinmode and digitalwrite?

Sure. I wanted to work with it in iterations. I thought I'll add them
later - once I attack other parts of the ulisp-arm. Is that OK?

References:
[1]: https://github.com/Infineon/XMC-for-Arduino

@technoblogy
Copy link
Owner

Yes, good plan. I'm thinking of getting a board so I can try it out.

@ramangopalan
Copy link
Author

Yes, good plan. I'm thinking of getting a board so I can try it out.

Super! :)

@technoblogy
Copy link
Owner

Can I mention your repository on the uLisp Forum, with a link?

http:https://forum.ulisp.com

or, even better, you could post a link to it yourself. Thanks!

@ramangopalan
Copy link
Author

Sure. I'll do that. In the meanwhile, I just implemented the initial
support for pin modes. Can you please check if the code is OK? The
code (for LED1) below works fine on the XMC4700 Relax Kit.

(defun b (&optional x) (digitalwrite 24 x) (delay 1000) (b (not x)))

@technoblogy
Copy link
Owner

The only thing you might want to add is a line in checkanalogread(pin) and checkanalogwrite(pin) to specify which pins can be used for analogue.

@technoblogy
Copy link
Owner

There seem to be three variants of the board:

KITXMC47RELAX5VADV1TOBO1
KITXMC47RELAXLITEV1TOBO1
KITXMC47RELAXV1TOBO1

Will your port work with each version, and which do you recommend?

@ramangopalan
Copy link
Author

The only thing you might want to add is a line in
checkanalogread(pin) and checkanalogwrite(pin) to specify which pins
can be used for analogue.

Perfect! Thank you. Sure. I will add in in a couple of hours. I will
make a few sanity tests as well.

@ramangopalan
Copy link
Author

There seem to be three variants of the board:

Understand. I found a table (from the manual) indicating their
differences. Here is a snip:

image

Will your port work with each version, and which do you recommend?

Sure. I just went through the board reference manual for the XMC4700
relax kit [1]. The port must work on all cards. I don't see a reason
why something can fail. I have the KITXMC47RELAXV1TOBO1 variant. It
has an ethernet PHY chip, an RJ45 jack, an external (SPI) flash
interface and an SD card interface. The SD card (and the external SPI
flash) interface will come to good use in the context of uLisp. :)

More peripherals, more fun :) I will certainly suggest the
KITXMC47RELAXV1TOBO1 kit. Also, this might be useful for testing OR
evaluating features outside the context of uLisp.

References:
[1]: https://www.infineon.com/dgdl/Infineon-Board_User_Manual_XMC4700_XMC4800_Relax_Kit_Series-UM-v01_02-EN.pdf?fileId=5546d46250cc1fdf01513f8e052d07fc

@ramangopalan
Copy link
Author

Also, I notice that there's no way to select between the variants. The
Arduino abstraction doesn't handle this. The microcontroller is the
same across all variants. Just more credence that the port will work
across all XMC47 board variants.

@ramangopalan
Copy link
Author

The only thing you might want to add is a line in
checkanalogread(pin) and checkanalogwrite(pin) to specify which pins
can be used for analogue.

I checked these board specific functions. I gathered the pins from the
XMC47 pinouts [1]. I generated a PWM on pin 3 with the patch. Looks
fine.

References:
[1]: https://github.com/Infineon/XMC-for-Arduino/wiki/XMC4700-Relax-Kit

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

2 participants