2015-03-12 07:35 AM
Hello,
I need a full documentation for the header I / O of this board (SPC560P - DISP). Is there? The manual on the site of St. explains only the configuration, but not their role. I need connect an LED to a breadboard and it flashes by writing C code on SPC5 studio.At the time I reached this configuration (attached) with the LED light is not flashing.Then, there are APIs for programming on this board. It is very complicated. Best regards Gianluca2015-03-13 07:50 AM
Hello Gianluca ,
you can find some useful information in this document : (ST website is sometimes not cleared)http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/user_manual/DM00116pdf
For your practical work , you can configure easily your PINs with the Pinmap Wizard. and use the chapter 2.12 of this document to connect the wire to your breadboard. we have a I/O Ports Abstraction Layer for this (Cf below)palTogglePad(YOUR_PORT, YOUR_PIN);
Best regards
2015-03-19 08:57 AM
Hello,
I have this sensor:http://www.sharpsma.com/webfm_send/1208I connected the GND and Voltage and then the signal in pad A0. I used your document and, if I understand, I used, in this case, the port PORT_C and pin 18 in the function palReadPad(PORT_C, 18) but doesn't work. I want that when I pass my hand near the sensor, my led is on.I don't understand how to manage the input with this board. Best regards Gianluca2015-03-19 09:25 AM
Hello Gianluca ,
You should develop a ADC conversion test application Pin example C[0]GND => GNDVCC ==> 5VVO ==> C[0] (for example)(configure C[0] for ADC INPUT with Pinmap Wizard)Configure correctly your ADC.you can display the value on the shell (Serial Port)and build a function of conversion V ==> cmGo from SPC560Pxx OS-Less ADC Test Application for Discovery Best Regards Erwan2015-03-30 01:23 PM
Hello Erwan,
Two days ago I was in ST. An employee told me that the sensor must have I2C interface to manage it and I have to move the two potentiometers of the board. Then I did not understand how to view the output on the screen. Serial port (console)? Where Is That? I use the wizard pinmap for what? When I select a pin me this: properties are not available. Best regards, Gianluca2015-03-31 12:55 AM
Hello Gianluca ,
1)with SPC560Pxx OS-Less Test Application for Discovery.
for the serial port , Serial Port is available on USB Cable (FTDI Chip). you should have a ''Hello World'' displayed on a console (38400 Bauds) UART by LINFLEX (cf io_settings)chnWriteTimeout(&SD1, (uint8_t *)
''Hello World!
''
, 14, TIME_INFINITE);
Please validate your ''Hello World'', check in your console first ;)
2)
GP2Y0A21YK is a ADC sensor. (cf documentation)
it is a very ''good'' choice becausethe ADC driver is existing already in SPC5Studio SPC560Pxx Components.
I2C Driver does not exist in SPC5Studio.
GND => GND
VCC ==> 5V
VO ==> C[0] (for example)
(configure C[0] for ADC INPUT with Pinmap Wizard)
with SPC560Pxx ADC OS-Less Test Application for Discovery
At the end of conversion , the drivers is calling a callback the samples should contain your value in voltage You have some libraries to convert your Analog Read into cm (distance) (Cf Figure 4) in datasheethttps://github.com/jeroendoggen/Arduino-GP2Y0A21YK-library/tree/master/DistanceGP2Y0A21YK
Your application should be a mix betweenSPC560Pxx ADC OS-Less Test Application for Discovery and
SPC560Pxx OS-Less Test Application for Discovery
Best regards Erwan2015-03-31 09:03 AM
Hello Erwan,
Excuse me but I still have problems with the serial port. Using the simulator console software UDE. I set the parameters as in the screenshot attached. I loaded the test program with the hello world But it does not work. I think there is a problem with the memory. There are two warning. Can you help me? Best regards Gianluca ________________ Attachments : setting.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0WT&d=%2Fa%2F0X0000000ba0%2FNC4qnt5jS23.UJCAx4kaOgLE7.DPggXFdArzp6IJawk&asPdf=falsewarning.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Sw&d=%2Fa%2F0X0000000bZz%2FHN7kjKA8OpyzeqitJW5VkkHi0jG2SQ1QzqFO2KfxpK4&asPdf=false2015-04-01 07:55 AM
Hello Gianluca ,
UDE is well synchronized. i do not validate the console on UDE, it seems to be used for the debugging only. 1) Check your drivers first you should have (First Screenshot) if PLS USB Serial port does not appear , enable VCP (Virtual Com port) (Cf 2nd Screenshot) 2) Check your hello world with Tera Term and your board should blink. i advice to use a teraterm for your terminal or hyperterminalhttp://en.sourceforge.jp/projects/ttssh2/releases/
(Cf 3rd Screenshot) Best regards Erwan ________________ Attachments : 2015-04-01_164705.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Vq&d=%2Fa%2F0X0000000bZy%2FXOlvzqWgerw9YJxQUBY4d7jpXLiArsmLo4dl9mSJMPc&asPdf=false2015-04-01_164756.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0WO&d=%2Fa%2F0X0000000bZx%2FwDZGFCSD6yUlwUFFIat9V6I6RzAW33cEyVow4hvmmgg&asPdf=false2015-04-01_165008.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzq0&d=%2Fa%2F0X0000000bZw%2FyAEuiJ7UrafkkM.iRueGbneyQNz_3VWcZoeDvZQawDU&asPdf=false2015-04-02 09:13 AM
Ok. The hello world works. I used Tera term. But how do I open a serial connection in the test program of the ADC? When I write sdStart (& SD1, NULL) informs the compiler that the variable SD1 is not declared.
In pinmap Wizard you can set the pin to LOW and HIGH. What will change? I used the F GPIO [0] in my board and configured the 133 in pinmap. is that correct? Attached the screen and the picture of the pin. Thank You. Best regards, Gianluca ________________ Attachments : IMG_20150402_180750.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0WE&d=%2Fa%2F0X0000000bZv%2FrxnuVD0qLPQk9C4qJ7xf6nAdccdwaBbpRNJXcrnIw9s&asPdf=falsescreen.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Mt&d=%2Fa%2F0X0000000bZs%2FD31T.vJs4sdz_5EkdaPW1IOnTQ1ikYG8Xp.tldkdwZ0&asPdf=false2015-04-03 08:58 AM
For the undeclared variable I solved so:
I've enabled the serial driver in the ''portable HAL'' component and the LinFLEX0 in the ''drivers component'' with the graphical tool. Then I re-generated the application.Now I try to manage the sensor. Best regards Gianluca.