configuration_json
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
configuration_json [ 08.04.2025 08:50] – lars | configuration_json [ 21.04.2025 12:14] (current) – lars | ||
---|---|---|---|
Line 25: | Line 25: | ||
* general settings | * general settings | ||
* peripheral settings | * peripheral settings | ||
- | | + | |
- | * signal names | + | * signal names |
==== general settings ==== | ==== general settings ==== | ||
Line 106: | Line 106: | ||
* " | * " | ||
* " | * " | ||
+ | |||
+ | ==== 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 ===== | ===== clock group ===== | ||
- | configuration of the used clocks | + | 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**: | ||
- | TBD | ||
Line 185: | Line 232: | ||
===== Timer group ===== | ===== Timer group ===== | ||
- | TBD | + | 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**: | ||
Line 196: | Line 284: | ||
===== UART group ===== | ===== UART group ===== | ||
- | This group defines all used UART interfaces. | + | 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. | Each UART is a sub group with the UART name as the group name. | ||
Line 203: | Line 291: | ||
" | " | ||
" | " | ||
- | "pads": { | + | "pad_tx": " |
- | "TX": " | + | "pad_rx": " |
- | "RX": " | + | "pad_cts": " |
- | "CTS": " | + | "pad_rts": " |
- | "RTS": " | + | |
- | }, | + | |
" | " | ||
" | " | ||
Line 216: | Line 302: | ||
" | " | ||
" | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
} | } | ||
} | } | ||
</ | </ | ||
+ | === pad_tx === | ||
- | ==== pads ==== | + | The UART will send data on this pin. (Idle = High). Either this or the pad_rx must be given. |
- | defines the used signal pins. At least one pin must be present(either TX or RX). Pins that are not present will not be used/ are not available for functionality. | + | === pad_rx === |
- | === TX === | + | The UART will receive (read) signals on this pin. Either this or pad_rx must be given. |
- | The UART will send data on this pin. (Idle = High). | + | === pad_cts === |
- | === RX === | + | Clear to send signal for flow control. Will not be used if not defined. |
- | The UART will receive (read) signals on this pin. | + | === pad_rts === |
- | === CTS === | + | Request to Send signal for flow control. Will not be used if not defined. |
- | + | ||
- | Clear to send signal for flow control. | + | |
- | + | ||
- | === RTS === | + | |
- | + | ||
- | Request to Send signal for flow control. | + | |
Line 297: | Line 381: | ||
**default**: | **default**: | ||
+ | |||
==== receive_buffer_size ==== | ==== receive_buffer_size ==== | ||
Line 312: | Line 397: | ||
**default**: | **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 ===== | ===== 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. | ||
< | < | ||
" | " | ||
" | " | ||
- | "pads": { | + | "pad_sck": " |
- | "SCK": " | + | "pad_miso": " |
- | "MISO": " | + | "pad_mosi": " |
- | "MOSI": " | + | "pad_ncs": " |
- | "NSS": " | + | |
- | } | + | |
" | " | ||
" | " | ||
Line 331: | Line 436: | ||
" | " | ||
" | " | ||
- | | + | " |
- | | + | |
- | " | + | |
- | " | + | |
} | } | ||
} | } | ||
</ | </ | ||
- | * // | ||
- | * //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. | + | === pad_sck === |
- | * //role: master//: role can be //master// or // | + | Serial Clock. |
- | * // | + | === pad_mosi === |
- | * | + | |
- | * // | + | |
- | **DICUSS(Lars): | + | " |
- | **REPLY(Johan)** Half duplex is different from unidirectional communication. | + | === pad_miso === |
- | **DICUSS(Lars): | + | "Master In Slave Out" |
- | **REPLY(Johan)** I agree: this is a bad idea. Unfortunately, | + | === pad_ncs === |
- | Maybe we just need a setting to specify which pad should be used for half-duplex communication. | + | Chip Select signal (Low active). |
- | This whole // | + | === role === |
- | * // | + | Is either master(host) |
- | | + | **type**: enum |
- | | + | **default**: master |
- | 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: | + | === communication_mode === |
- | ^ Mode ^ CPOL ^ CPHA ^ description^ | + | Describes the communication. Possible values are: |
- | | 0 | 0 | 0 | clock: idle_low, phase: sample_on_leading_edge | | + | * duplex |
- | | 1 | 0 | 1 | clock: idle_low, phase: sample_on_trailing_edge | | + | * half-duplex |
- | | 2 | 1 | 0 | clock: idle_high, phase: sample_on_leading_edge | | + | * receive-only |
- | | 3 | 1 | 1 | clock: idle_high, phase: sample_on_trailing_edge | | + | * send-only |
- | | + | **type**: enum |
- | | + | **default**: duplex |
- | **DICUSS(Lars): | + | === frame_format === |
- | **REPLY(Johan): | + | Describes |
+ | * motorola : the " | ||
+ | * ti : | ||
- | **DICUSS(Lars): | + | **type**: enum |
- | **REPLY(Johan): | + | **default**: motorola |
- | * //crc//: //enabled// or // | + | === clock_polarity === |
+ | Also often called CPOL. Describes the communication. Possible values are: | ||
+ | * idle_low | ||
+ | * idle_high | ||
- | **DICUSS(Lars): | + | **type**: enum |
- | **REPLY(Johan): | + | **default**: idle_low |
- | | + | === clock_phase === |
+ | Also often called CPHA. Describes the communication. Possible values are: | ||
+ | | ||
+ | * sample_on_trailinging_edge : samples | ||
- | **DICUSS(Lars): | + | **type**: enum |
- | **REPLY(Johan)** You are right. Wikipedia https:// | + | **default**: sample_on_leading_edge |
- | **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. | + | === 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: | ||
- | **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 | + | ^ Mode ^ CPOL ^ CPHA ^ description^ |
+ | | 0 | 0 | 0 | clock: idle_low, | ||
+ | | 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)** Does that mean that for supported devices, | ||
- | ===== QSPI group ===== | + | === 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 ) | ||
- | TBD | + | **type**: enum |
- | ===== SDIO group ===== | + | **default**: |
- | TBD | + | === baud_rate === |
- | ===== I2C group ===== | + | Is the number of bits per second exchanged on the data lines. Expressed as frequency of the clock line. |
- | TBD | + | **type**: int (Hz) |
- | + | ||
- | + | ||
- | ===== I3C group ===== | + | |
- | + | ||
- | TBD | + | |
- | + | ||
- | + | ||
- | ===== I2S group ===== | + | |
- | + | ||
- | TBD | + | |
- | + | ||
- | + | ||
- | ===== CAN group ===== | + | |
- | + | ||
- | TBD | + | |
- | + | ||
- | + | ||
- | ===== USB group ===== | + | |
- | + | ||
- | TBD | + | |
- | + | ||
- | + | ||
- | ===== Watchdog group ===== | + | |
- | + | ||
- | TBD | + | |
- | + | ||
- | ===== Random_Number group ===== | + | |
- | + | ||
- | TBD | + | |
- | + | ||
- | + | ||
- | ===== CRC group ===== | + | |
- | + | ||
- | TBD | + | |
configuration_json.1744102211.txt.gz · Last modified: by lars