Running the IBU UI tool
UM0935
20/53
Doc ID 17398 Rev 3
Through selection, the GPIO can be set in different modes (as shown
), such as
simple input mode, input with interrupt, and push-pull output mode. Also in the SPI interface,
there is an option in GPIO3 and GPIO4 to use this GPIO as the PWM clock signal. And
there is an option in GPIO4 to use it as the ADC channel.
3.2.3 Using
GPIOs
as PWM settings
As mentioned above, GPIO 3 and GPIO 4 can also additionally be set in PWM mode. To do
this, set the GPIO3 or GPIO4 in PWM mode and provide the PWM frequency (maximum
value tested is around 10 MHz) and also the duty cycle to generate different kinds of clocks.
The frequency of the PWM clock generated can vary from 10 kHz to 10 MHz.
The duty cycle of the PWM clock can vary from 0 % to 100 %. Logic '0' is obtained with duty
cycle 0 % and logic '1' is obtained with duty cycle 100 %. Please, refer to
.
3.2.4 Using
GPIOs as ADC settings
As mentioned above, GPIO 4 can also additionally be set as an analog channel input. To do
this, set the GPIO 4 in ADC mode and perform the analog settings. Analog settings include
ADC sample time selection and ADC resolution. After that, specify the number of samples
that are required. Analog input can then be provided on this pin and the set of the digital
value can be obtained.
If the resolution set is 8-bit, one byte is obtained for every sample of the ADC conversion.
If the resolution set is 12-bit, two bytes are obtained for every sample of the ADC
conversion. ADC sample time selection values can be one of the following:
7.5 cycles, 13.5 cycles, 28.5 cycles, 41.5 cycles, 55.5 cycles, 71.5 cycles, or 239.5 cycles.
3.2.5
SPI header settings
Once the GPIO settings are done, the daughter board can be connected to the IBU UI
board. Before using the SPI communication, some parameters must first be defined.
These parameters include the selection of CPOL, CPHA and baud rate pre-scalar (by
default, the most significant bit is put first).
As in SPI standard protocol, CPHA and CPOL values can be 0 or 1. SPI baud rate should
be set with values equal to 2, 4, 8, 16, 32, 64, 128, and 256. The SPI base frequency is
36 kHz. Therefore, if the baud rate pre-scalar is set as 4, the SPI runs at a frequency equal
to 9 kHz.
Once the selection is made, it sets the SPI interface and now the system is ready to read or
write the data from the SPI slave device connected to the IBU UI board.
3.2.6 SPI
read
and write operation
Once the SPI settings have been made, it is possible to read the registers of the slave
device and write in the registers of the slave device. After every read and write operation,
the user can obtain information about the status of the communication.
To read/write in the register, select the register address length depending on the slave
device.
Summary of Contents for STEVAL-PCC009V2
Page 4: ...Contents UM0935 4 53 Doc ID 17398 Rev 3 Appendix D Tables and figures 50 Revision history 52...
Page 42: ...UM0935 Schematics and BOM list Doc ID 17398 Rev 3 42 53 Figure 32 10 pin com interface V...
Page 43: ...Schematics and BOM list UM0935 43 53 Doc ID 17398 Rev 3 Figure 33 30 pin com interface V...