monoZ docs
|
Depending on the selected monoZero board, monoZ SDK libraries are available for 4 peripherals namely GPIO, UART, I2C and SPI which can be configured in the peripheral tab based on user requirements.
Suppose the user wants to make pin 6 of port D (PD6) as GPIO, please follow these steps:
Peripheral: Select the GPIO option from the peripheral tab and then click the add button.
Enable GPIO: Check the GPIO checkbox to enable the GPIO peripheral . Enter the required name for the GPIO peripheral such as “Modem” ,”CLI & Print”.
The GPIO peripherals will not be enabled with the generated application if the checkbox is unchecked.
Settings: Click the settings icon to open the GPIO settings window.
Enable Port Configuration: Select PORT D and then check the Port Configuration checkbox. This will enable the Port Configuration.
Pin Configuration: Choose the required pin , here pin 6 and then check the Pin Configuration checkbox, assign them the appropriate configuration (Mode/Pull/Speed Frequency/Alternate) for the GPIO pin to behave.
MODE : IP
PULL : NO PULL / PULL UP / PULL DOWN
SPEED FREQ : LOW / MEDIUM / HIGH / VERY HIGH
ALTERNATE : User Alternate Number
Activate All Pins: When the Activate All Pins checkbox is checked, all the pins will be enabled.Then choose the required pins to setup from the list of available pins.
Follow these steps to configure I2C2 :
Peripheral: Select the I2C option from the peripheral tab and then click the add button.
Enable I2C: Check theI2C checkbox to enable the I2C peripheral. Enter the required name for the I2C peripheral.
The I2C peripherals will not be enabled with the generated application if the checkbox is unchecked.
Settings: Click the settings icon to open the I2C settings window.
I2C Settings Window: Configure the I2C module related settings in this window
Timing : 0x10909CEC
Own Address1 : User Address1
Addressing Mode : 7 bit / 10 bit
Dual Address mode : Enable / Disable
Own Address2 : User Address2
Own Address2 Masks : No Mask / Mask 1 / Mask 2 /.. / Mask 7
General Call Mode : Enable / Disable
No Strech Mode : Enable / Disable
Note:To configure various parameters in the I2C settings window , please refer to the relevant sensor module's datasheet.
Follow these steps to configure SPI (here SPI1) :
Peripheral: Select the SPI option from the peripheral tab and then click the add button.
Enable SPI: Check the SPI checkbox to enable the SPI peripheral. Enter the required name for the SPI peripheral.
The SPI peripherals will not be enabled with the generated application if the checkbox is unchecked.
Settings: Click the settings icon to open the SPI settings window.
SPI Settings Window: Configure the SPI module related settings in this window.
MODE : MASTER / SLAVE
DIRECTION : 2LINES / 2LINES_RXONLY / 1LINE
DATA SIZE : 4BIT / 5BIT / .. / 16BIT
CLK POLARITY : LOW / HIGH
CLK PHASE : 1EDGE / 2EDGE
NSS : SOFT / HARD_INPUT / HARD_OUTPUT
BAUDRATE PRESCALAR : 2 / 4 / 8 /../ 256
FIRST BIT : MSB / LSB
TI MODE : ENABLE / DISABLE
CRC CALCULATION : ENABLE / DISABLE
CRC POLYNOMIAL : User Polynomial
CRC LENGTH : DATASIZE / 8BIT / 16BIT
NSSP MODE : ENABLE / DISABLE
Note:To configure various parameters in the SPI settings window , please refer to the relevant sensor module's datasheet.
Follow these steps to configure USART (here USART3):
Peripheral: Select the USART option from the peripheral tab and then click the add button.
Enable USART: Check the USART checkbox to enable the USART peripheral.Enter the required name for the USART peripheral.
The USART peripherals will not be enabled with the generated application if the checkbox is unchecked.
Settings: Click the settings icon to open the USART settings window.
USART Settings Window: Configure the USART module related settings in this window
Baud Rate : 9600 / 19200 / 115200 /../ 921600
Data Bits : 7B / 8B / 9B
Stop Bits : 0.5 / 1 / 1.5 / 2
Parity : None / Even / Odd
Mode : Tx Rx / Tx Only / Rx Only
HW Flow Control : None
Over Sampling : 8 / 16
One Bit Sampling : Enable / Disable
Adv Feature No Init : No Init
Note:To configure various parameters in the USART settings window , please refer to the relevant sensor module's datasheet.
Click here to configure the Appliction.