configuration_json
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
configuration_json [ 12.04.2025 16:17] – lars | configuration_json [ 17.08.2025 05:59] (current) – lars | ||
---|---|---|---|
Line 25: | Line 25: | ||
* general settings | * general settings | ||
* peripheral settings | * peripheral settings | ||
- | | + | |
- | * signal names | + | * signal names |
==== general settings ==== | ==== general settings ==== | ||
Line 62: | Line 62: | ||
- | ===== general settings ===== | + | ===== All the Settings |
- | + | * [[adc_group | |
- | these are settings on the top layer that effect the whole project. | + | * [[dac_group |
- | + | * [[clock_group | |
- | ==== vendor_name | + | * [[digital_output_group | digital_output |
- | + | * [[digital_input_group | |
- | Name of the company that sells the micro controller. As listed on https:// | + | * [[general_settings |
- | + | * [[I2C_group | |
- | **type**: string | + | * [[QSPI_group |
- | + | * [[rtc_group | |
- | ==== chip_name ==== | + | * [[SPI_group |
- | + | * [[timer_group | |
- | Model number of the micro controller. As listed on https:// | + | * [[UART_group |
- | + | * [[watchdog_group | |
- | **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. | + | |
- | + | ||
- | + | ||
- | ==== project_type ==== | + | |
- | + | ||
- | what type of project to generate. | + | |
- | + | ||
- | **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 UART interfaces. | + | |
- | + | ||
- | Each UART is a sub group with the UART name as the group name. | + | |
- | + | ||
- | < | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | ==== pads ==== | + | |
- | + | ||
- | 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. | + | |
- | + | ||
- | === TX === | + | |
- | + | ||
- | The UART will send data on this pin. (Idle = High). | + | |
- | + | ||
- | === RX === | + | |
- | + | ||
- | The UART will receive (read) signals on this pin. | + | |
- | + | ||
- | === CTS === | + | |
- | + | ||
- | Clear to send signal for flow control. | + | |
- | + | ||
- | === RTS === | + | |
- | + | ||
- | Request to Send signal for flow control. | + | |
- | + | ||
- | + | ||
- | ==== 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**: | + | |
- | + | ||
- | + | ||
- | ===== 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 | + | |
configuration_json.1744474638.txt.gz · Last modified: by lars