Using CDC (USB) connection you can
programmatically control interfaces
When the device is connected via USB, by connecting a terminal, you can get help on using the control commands. At the end of each command there must be a CR (0x0D) symbol.
outputs information about possible commands.
outputs the current configuration settings
commands for configuring the UART interface:
shows list of commands for configuring the SPI interface:
shows list of commands for configuring the UART interface:
saves the current setting to the flash. On the next powrt connection of the device, this configuration will be automatic activated.
makes the UART interface unused.
activates the UART interface.
Sets the communication speed for the UART interface. must be a value from 1200 to 2500000 baud per second.
Example: [SET:UART.BAUD=57600] - sets the communication speed to 57600.
set the base clock prescaler:
BASE CLOCK = 48MHz /(2 << PRESC );
makes division of base clock (see PRESC) with value:
0 divede by 2,
1 divide by 4,
2 divide by 8,
3 divide by 16,
4 divide by 32,
5 divide by 54,
6 divide by 128,
7 divide by 256.
makes the SPI interface unused.
activates the SPI interface.
set up the clock polarity (0 or 1);
set up the clock phase (0 or 1);
allow or disallow to transwer between interfaces where and is:
CDC, UART, SPI or I2C;
for example:
[TRN:CDS-UART.EN] - allow a trafik from CDS to UART.
[TRN:UART-UART.EN] - allow a trafik from UART to CDS.