Page 1 of 1

EB-063 connection RF-macro

Posted: Thu Apr 14, 2011 12:18 pm
by saschech@gmx.de
Hello Team

In the ext properti.. thera are software and hardware connection.
in software-conn. i can set all io-pins to ports i want.

in hardware-conn. i can set only the cs-pin and the fsel-pin to all ports.
Question:
Use the rf-macro the sck2,sdi2,sdo2 pins ? >> 30F5013
because many chip`s have also sck1,sdi1,sdo1 pins.>>30F6012A

Regards Wolfgang

Re: EB-063 connection RF-macro

Posted: Thu Apr 14, 2011 12:48 pm
by Benj
Hi Wolfgang,

When the component is in hardware mode it will default to SPI peripheral number 1.

E.g. sck1,sdi1,sdo1 pins

You can re-assign the SPI peripheral if you wish by using the custom code feature to change the following definition.

#define MX_RF_SPI_HW %a //SPI Hardware or Bitbanged Port Control

to

#define MX_RF_SPI_HW 2 //SPI Hardware Peripheral 2

Re: EB-063 connection RF-macro

Posted: Thu Apr 14, 2011 1:58 pm
by saschech@gmx.de
Hello Benj

I have understand your answer and i now the costum-code-macro
but i have a big problem to use it in praxis
is there a example for rename the 3 spi1 pins to spi2 because i use the int0 (is the sck1-pin)?

regards Wolfgang

Re: EB-063 connection RF-macro

Posted: Thu Apr 14, 2011 6:00 pm
by Benj
Hello Wolfgang,

Yes as I seaid before switching between peripherals is fairly straightforward.

Select the RF component on the panel and click the custom code button in the panel properties pane.

Then select the defines function and click edit.

Find the line near the top of the defines.

#define MX_RF_SPI_HW %a //SPI Hardware or Bitbanged Port Control

and change it to match this.

#define MX_RF_SPI_HW 2 //SPI Hardware Peripheral 2

Click Ok and hopefully that's job done.

Re: EB-063 connection RF-macro

Posted: Fri Apr 15, 2011 10:22 am
by saschech@gmx.de
Hello Benj
Thank you again!!
I was thinking a complete other one..... "custom" in the Misc-tab ..... oh,oh
it is fairly straightforward to change!

Is these change only for the project or for ever in a file?

Regards Wolfgang

Re: EB-063 connection RF-macro

Posted: Fri Apr 15, 2011 10:29 am
by Benj
Hi Wolfgang,

The change is only on a project basis. If you need a more permanent solution for other programs then you can either export the customized component and then import into programs that need the mod, (this can be done via the customise window) or you can manually edit the component C file to make the change permanent.