ulisp-arm icon indicating copy to clipboard operation
ulisp-arm copied to clipboard

XMC4700 Relax Kit: Initial working commit

Open ramangopalan opened this issue 3 years ago • 12 comments

Initial working commit for the Infineon XMC4700 Relax Kit.

ramangopalan avatar May 11 '21 08:05 ramangopalan

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?

technoblogy avatar May 11 '21 09:05 technoblogy

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

ramangopalan avatar May 11 '21 09:05 ramangopalan

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

technoblogy avatar May 11 '21 09:05 technoblogy

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

Super! :)

ramangopalan avatar May 11 '21 09:05 ramangopalan

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

http://forum.ulisp.com

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

technoblogy avatar May 11 '21 10:05 technoblogy

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)))

ramangopalan avatar May 11 '21 10:05 ramangopalan

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 avatar May 11 '21 11:05 technoblogy

There seem to be three variants of the board:

KITXMC47RELAX5VADV1TOBO1 KITXMC47RELAXLITEV1TOBO1 KITXMC47RELAXV1TOBO1

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

technoblogy avatar May 11 '21 11:05 technoblogy

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 avatar May 11 '21 11:05 ramangopalan

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 avatar May 11 '21 12:05 ramangopalan

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 avatar May 11 '21 13:05 ramangopalan

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

ramangopalan avatar May 11 '21 15:05 ramangopalan