configuration_json
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
configuration_json [ 21.04.2025 12:14] – lars | configuration_json [ 08.10.2025 14:32] (current) – lars | ||
---|---|---|---|
Line 40: | Line 40: | ||
The user shall not be bothered with the details of the used peripheral. The user should therefore not depend on peripheral names (" | The user shall not be bothered with the details of the used peripheral. The user should therefore not depend on peripheral names (" | ||
+ | ===== Types of Settings ===== | ||
- | ===== Example ===== | + | Each setting has a type. The following types are allowed: |
- | < | + | * string |
- | { | + | * enum |
- | " | + | * int |
- | " | + | * bool |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | } | + | |
- | " | + | |
- | ... | + | |
- | } | + | |
- | } | + | |
- | </ | + | |
- | Keys like *digital_output* and *SPI* represent group names and are taken from a predefined set of group names understood by MBSP. Keys nested within them are arbitrary user-defined names for a instance in that group. In those instances the keys are from the defined set specific for that group. | + | ==== string ==== |
+ | The value is a text. | ||
- | ===== general settings ===== | + | **Example: |
- | these are settings on the top layer that effect the whole project. | + | ==== enum ==== |
- | + | ||
- | ==== vendor_name | + | |
- | Name of the company that sells the micro controller. As listed on https:// | + | The value is one out of a limited number of possible values. |
- | **type**: string | + | **Example:** " |
- | ==== chip_name | + | ==== int ==== |
- | Model number | + | The value is a number. |
- | **type**: string | + | **Example:** " |
- | Model number is truncated so that it only contains relevant differences for code generation: flash and ram sizes are relevant, temperature range or package are not. | + | ==== bool ==== |
+ | The value is either " | ||
- | ==== project_type ==== | + | **Example: |
- | what type of project to generate. | + | ===== Example |
- | + | ||
- | **type**: string | + | |
- | + | ||
- | **default**: | + | |
- | + | ||
- | Possible values are: | + | |
- | * "hal only" : only creates the hardware driver files (in the hal/ folder) and hardware definitions (in the hal/hw/ folder) | + | |
- | * " | + | |
- | * " | + | |
- | + | ||
- | + | ||
- | ==== file_comment | + | |
- | + | ||
- | defines the comment at the top of each generated file. | + | |
- | + | ||
- | **type**: string | + | |
- | + | ||
- | **default**: | + | |
- | + | ||
- | Possible values are: | + | |
- | * " | + | |
- | * " | + | |
- | + | ||
- | ==== run_from ==== | + | |
- | + | ||
- | defines the location of the firmware code when run. | + | |
- | + | ||
- | **type**: string | + | |
- | + | ||
- | **default**: | + | |
- | + | ||
- | Possible values are: | + | |
- | * " | + | |
- | * " | + | |
- | * " | + | |
- | + | ||
- | ==== path_prefix ==== | + | |
- | + | ||
- | if you use a "hal only" MBSP project located in a sub folder of your project then the name of the sub folder goes here. | + | |
- | + | ||
- | **type**: string | + | |
- | + | ||
- | **default**: | + | |
- | + | ||
- | + | ||
- | ===== clock group ===== | + | |
- | + | ||
- | configuration of the used clocks. | + | |
- | + | ||
- | < | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | ==== source ==== | + | |
- | + | ||
- | defines the source of the clock signal. Supported clock sources are: | + | |
- | * " | + | |
- | * ... | + | |
- | + | ||
- | **type**: enum | + | |
- | + | ||
- | **default**: | + | |
- | + | ||
- | ==== frequency ==== | + | |
- | + | ||
- | defines the frequency that this clock has. | + | |
- | + | ||
- | **type**: string (Hz, kHz, MHz) | + | |
- | + | ||
- | **default**: | + | |
- | + | ||
- | + | ||
- | + | ||
- | ===== digital_output group ===== | + | |
- | + | ||
- | This group contains all digital output signals. | + | |
- | + | ||
- | Each signal is a sub group with the signal name as the group name. | + | |
< | < | ||
+ | { | ||
+ | " | ||
+ | " | ||
" | " | ||
" | " | ||
- | " | + | " |
" | " | ||
} | } | ||
} | } | ||
- | </ | ||
- | |||
- | ==== type ==== | ||
- | |||
- | defines what type of output mode should be used. Type can be: | ||
- | * push pull | ||
- | * open drain | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | ==== pad ==== | ||
- | |||
- | defines the chip pad that the signal should be output on. | ||
- | |||
- | **type**: string | ||
- | |||
- | **default**: | ||
- | |||
- | ==== invert ==== | ||
- | |||
- | If this setting is set to " | ||
- | |||
- | If this setting is set to " | ||
- | |||
- | **type**: string | ||
- | |||
- | **default**: | ||
- | |||
- | |||
- | ===== digital_input group ===== | ||
- | |||
- | This group contains all digital input signals. | ||
- | |||
- | Each signal is a sub group with the signal name as the group name. | ||
- | |||
- | |||
- | ==== pad ==== | ||
- | |||
- | defines the chip pad that the signal should be read from. | ||
- | |||
- | **type**: string | ||
- | |||
- | |||
- | ===== analogue_input (ADC) group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== analogue_output (DAC) group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== Timer group ===== | ||
- | |||
- | This group contains all timer and counter peripherals. | ||
- | |||
- | < | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | ==== peripheral ==== | ||
- | |||
- | defines which peripheral to use. peripherals can be: | ||
- | * systick (part of the ARM core) | ||
- | * timer1 | ||
- | * timer2 | ||
- | * ... | ||
- | |||
- | **type**: String | ||
- | |||
- | **default**: | ||
- | |||
- | ==== mode ==== | ||
- | |||
- | defines the operation mode the timer/ | ||
- | * count overflows | ||
- | |||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | ==== frequency ==== | ||
- | |||
- | The frequency defines the time between timer overflows. 1kHz means that the time between overflow events is 1/(1 kHz) = 1 ms. | ||
- | |||
- | **type**: string (Hz, kHz, MHz) | ||
- | |||
- | **default**: | ||
- | |||
- | |||
- | |||
- | |||
- | ===== RTC group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== UART group ===== | ||
- | |||
- | This group defines all used Universal Asynchronous Receiver Transmitter (UART) interfaces. | ||
- | |||
- | Each UART is a sub group with the UART name as the group name. | ||
- | |||
- | < | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | === pad_tx === | ||
- | |||
- | The UART will send data on this pin. (Idle = High). Either this or the pad_rx must be given. | ||
- | |||
- | === pad_rx === | ||
- | |||
- | The UART will receive (read) signals on this pin. Either this or pad_rx must be given. | ||
- | |||
- | === pad_cts === | ||
- | |||
- | Clear to send signal for flow control. Will not be used if not defined. | ||
- | |||
- | === pad_rts === | ||
- | |||
- | Request to Send signal for flow control. Will not be used if not defined. | ||
- | |||
- | |||
- | ==== bits_per_packet ==== | ||
- | |||
- | defines the number of data bits. Possible values are: | ||
- | * 7 | ||
- | * 8 | ||
- | * 9 | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | ==== parity ==== | ||
- | |||
- | defines the parity bit. Possible values are: | ||
- | * None : no parity bit used. | ||
- | * Odd : the parity bits value makes sure that the packet contains an **__odd__** number of bits with value " | ||
- | * Even : the parity bits value makes sure that the packet contains an **__even__** number of bits with value " | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | |||
- | ==== stop_bits ==== | ||
- | |||
- | defines the number of stop bits. Possible values are: | ||
- | * 1 | ||
- | * 1,5 | ||
- | * 2 | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | |||
- | ==== baud_rate ==== | ||
- | |||
- | defines the number of bits send per second. | ||
- | |||
- | **type**: int | ||
- | |||
- | **default**: | ||
- | |||
- | |||
- | ==== hardware_flow_control ==== | ||
- | |||
- | defines if the Request to Send (RTS) and Clear to send (CTS) signals should be used for flow control. Possible values are: | ||
- | * off (RTS and CTS pins are not used. | ||
- | * RTS only | ||
- | * CTS only | ||
- | * on (RTS and CTS signals are used) | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | ==== receive_buffer_size ==== | ||
- | |||
- | defines the number of bytes in the receive buffer of the driver. | ||
- | |||
- | **type**: int | ||
- | |||
- | **default**: | ||
- | |||
- | ==== send_buffer_size ==== | ||
- | |||
- | defines the number of bytes in the send buffer of the driver. | ||
- | |||
- | **type**: int | ||
- | |||
- | **default**: | ||
- | |||
- | ==== peripheral ==== | ||
- | |||
- | name of the UART peripheral to use. | ||
- | |||
- | **type**: String | ||
- | |||
- | ==== IRQ ==== | ||
- | |||
- | The interrupt number of the peripheral. | ||
- | |||
- | **type**: int | ||
- | |||
- | ==== IRQ_priority ==== | ||
- | |||
- | The interrupt priority of the interrupt. | ||
- | |||
- | **type**: int | ||
- | |||
- | |||
- | ===== SPI group ===== | ||
- | |||
- | This group defines all used Serial Peripheral Interface (SPI) interfaces. | ||
- | |||
- | Each SPI interface is a sub group with the SPI name as the group name. | ||
- | |||
- | < | ||
" | " | ||
- | | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
} | } | ||
+ | } | ||
</ | </ | ||
+ | Keys like *digital_output* and *SPI* represent group names and are taken from a predefined set of group names understood by MBSP. Keys nested within them are arbitrary user-defined names for a instance in that group. In those instances the keys are from the defined set specific for that group. | ||
- | === pad_sck === | ||
- | |||
- | Serial Clock. | ||
- | |||
- | === pad_mosi === | ||
- | |||
- | " | ||
- | |||
- | === pad_miso === | ||
- | |||
- | " | ||
- | |||
- | === pad_ncs === | ||
- | |||
- | Chip Select signal (Low active). | ||
- | |||
- | === role === | ||
- | |||
- | Is either master(host) or slave(device). | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | === communication_mode === | ||
- | |||
- | Describes the communication. Possible values are: | ||
- | * duplex : the traditional mode using MISO and MOSI to transmit and receive at the same time. | ||
- | * half-duplex : meaning the same wire between master and slave is used for both directions. | ||
- | * receive-only : send line is not used | ||
- | * send-only : receive Line is not used. | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | === frame_format === | ||
- | |||
- | Describes the communication. Possible values are: | ||
- | * motorola : the " | ||
- | * ti : | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | === clock_polarity === | ||
- | Also often called CPOL. Describes the communication. Possible values are: | ||
- | * idle_low | ||
- | * idle_high | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | === clock_phase === | ||
- | Also often called CPHA. Describes the communication. Possible values are: | ||
- | * sample_on_leading_edge : samples the data on the edge from idle value to non-idle value. | ||
- | * sample_on_trailinging_edge : samples the data on the edge from non-idle value to idle value. | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | |||
- | === SPI Mode === | ||
- | Sometimes the documentation talks about a SPI Mode with the value of 0 to 3. This mode maps to the phase and polarity as described in the following table: | ||
- | |||
- | ^ Mode ^ CPOL ^ CPHA ^ description^ | ||
- | | 0 | 0 | 0 | clock: idle_low, phase: sample_on_leading_edge | | ||
- | | 1 | 0 | 1 | clock: idle_low, phase: sample_on_trailing_edge | | ||
- | | 2 | 1 | 0 | clock: idle_high, phase: sample_on_leading_edge | | ||
- | | 3 | 1 | 1 | clock: idle_high, phase: sample_on_trailing_edge | | ||
- | |||
- | |||
- | |||
- | === bit_order === | ||
- | Describes the communication. Possible values are: | ||
- | * msb_first : most significant bit first (bits on the line : 76543210 ) | ||
- | * lsb_first : least significant bit first (bits on the line: 01234567 ) | ||
- | |||
- | **type**: enum | ||
- | |||
- | **default**: | ||
- | |||
- | === baud_rate === | ||
- | |||
- | Is the number of bits per second exchanged on the data lines. Expressed as frequency of the clock line. | ||
- | **type**: int (Hz) | + | ===== All the Settings ===== |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | * [[digital_input_group | ||
+ | * [[general_settings | ||
+ | * [[I2C_group | ||
+ | * [[QSPI_group | ||
+ | * [[rtc_group | ||
+ | * [[SPI_group | ||
+ | * [[timer_group | ||
+ | * [[UART_group | ||
+ | * [[watchdog_group | ||
configuration_json.1745237695.txt.gz · Last modified: by lars