configuration_json
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
configuration_json [ 25.11.2024 17:55] – [type] lars | configuration_json [ 17.08.2025 05:59] (current) – lars | ||
---|---|---|---|
Line 3: | Line 3: | ||
====== File format specification of configuration definition ====== | ====== File format specification of configuration definition ====== | ||
- | this describes the possible elements of a configuration description in json format. | + | this describes the possible elements of a configuration description in JSON format. |
- | The json format is defined here: https:// | + | {{odt> |
+ | |||
+ | The JSON format is defined here: https:// | ||
All elements not listed as essential are optional. Being optional means that they can be missing and the configuration is still valid. | All elements not listed as essential are optional. Being optional means that they can be missing and the configuration is still valid. | ||
Line 23: | Line 25: | ||
* general settings | * general settings | ||
* peripheral settings | * peripheral settings | ||
- | | + | |
- | * signal names | + | * signal names |
==== general settings ==== | ==== general settings ==== | ||
- | general settings | + | general settings |
==== peripheral settings ==== | ==== peripheral settings ==== | ||
Line 58: | Line 60: | ||
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. | 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. | ||
- | |||
- | |||
- | ===== vendor_name ===== | ||
- | |||
- | Name of the company that sells the micro controller. As listed on chipselect.org | ||
- | |||
- | type: string | ||
- | |||
- | ===== chip_name ===== | ||
- | |||
- | model number of the micro controller. | ||
- | |||
- | type: string | ||
- | |||
- | 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. | ||
- | |||
- | |||
- | ===== clock group ===== | ||
- | |||
- | configuration of the used cocks | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== 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: push pull | ||
- | |||
- | ==== pad ==== | ||
- | |||
- | defines the chip pad that the signal should be output on. | ||
- | |||
- | type: string | ||
- | |||
- | ===== 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 ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | |||
- | ===== RTC group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== UART group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== SPI group ===== | ||
- | |||
- | < | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | < | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | * // | ||
- | |||
- | * //pads// specifies the desired pad for each signal of this SPI peripheral. Usually, this will uniquely define the peripheral to be used. Unused signals can be skipped. | ||
- | |||
- | * //role: master//: role can be //master// or // | ||
- | |||
- | * // | ||
- | * | ||
- | * // | ||
- | |||
- | **DICUSS(Lars): | ||
- | |||
- | **REPLY(Johan)** Half duplex is different from unidirectional communication. | ||
- | |||
- | **DICUSS(Lars): | ||
- | |||
- | **REPLY(Johan)** I agree: this is a bad idea. Unfortunately, | ||
- | |||
- | Maybe we just need a setting to specify which pad should be used for half-duplex communication. | ||
- | |||
- | This whole // | ||
- | |||
- | * // | ||
- | |||
- | * // | ||
- | |||
- | * // | ||
- | |||
- | 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 | | ||
- | |||
- | * // | ||
- | |||
- | * // | ||
- | |||
- | **DICUSS(Lars): | ||
- | |||
- | **REPLY(Johan): | ||
- | |||
- | **DICUSS(Lars): | ||
- | |||
- | **REPLY(Johan): | ||
- | |||
- | * //crc//: //enabled// or // | ||
- | |||
- | **DICUSS(Lars): | ||
- | |||
- | **REPLY(Johan): | ||
- | |||
- | * // | ||
- | |||
- | **DICUSS(Lars): | ||
- | |||
- | **REPLY(Johan)** You are right. Wikipedia https:// | ||
- | |||
- | **DICUSS(Lars): | ||
- | |||
- | **REPLY(Johan)** Agreed: let's postpone this. It is not essential for a demo, so we can even postpone it until after the demo. | ||
- | |||
- | **REPLY(Johan)** How/where would you specify the parameters of the connected device? Many other SPI parameters specified here also depend on the connected device. For example clock polarity and phase and bit order must match the device' | ||
- | |||
- | **DICUSS(Lars): | ||
- | |||
- | **REPLY(Johan)** Does that mean that for supported devices, | ||
- | |||
- | ===== QSPI group ===== | ||
- | |||
- | TBD | ||
- | |||
- | ===== SDIO group ===== | ||
- | |||
- | TBD | ||
- | |||
- | ===== I2C group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== I3C group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== I2S group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== CAN group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== USB group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== Watchdog group ===== | ||
- | |||
- | TBD | ||
- | |||
- | ===== Random_Number group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | ===== CRC group ===== | ||
- | |||
- | TBD | ||
- | |||
- | ===== ... group ===== | ||
- | |||
- | TBD | ||
- | |||
- | |||
- | |||
- | |||
+ | ===== All the Settings ===== | ||
+ | * [[adc_group | ||
+ | * [[dac_group | ||
+ | * [[clock_group | ||
+ | * [[digital_output_group | digital_output group]] | ||
+ | * [[digital_input_group | ||
+ | * [[general_settings | ||
+ | * [[I2C_group | ||
+ | * [[QSPI_group | ||
+ | * [[rtc_group | ||
+ | * [[SPI_group | ||
+ | * [[timer_group | ||
+ | * [[UART_group | ||
+ | * [[watchdog_group | ||
configuration_json.1732557307.txt.gz · Last modified: by lars