Peripherals - nxp-mcuxpresso/vscode-for-mcux GitHub Wiki

Peripherals is a generic term referring to both core peripherals, for example the System Timer (SysTick) and SOC/MCU peripherals such as an ADC or UART. In both instances these hardware blocks are exposed within the MCUs address space (known as memory mapped peripherals) and so can be interrogated by accesses to their specific memory locations.

SVD files (provided by an SDK) include knowledge of an MCU’s peripheral set, which is made available via the Peripherals view within the Run and Debug view in the Side Bar, once a debug connection is made.

Peripherals View

In this view each peripheral is listed along with its value, base address, access, and a brief description. The view also exposes the inner peripheral registers and offers bit field enumerations to greatly simplify both reading existing configurations and setting new values.

Peripheral Register View Modifying Bit Field Value

Note: When an MCU powers up, many peripherals will be unavailable because they are unpowered/not clocked. Attempting to access a peripheral in this state will result in failure, and the peripheral view will simply display "???" as the value.

Warning: It is strongly advised that only peripherals that are well understood are accessed in this manner since attempting to view certain peripherals can break a debug connection or perform other unexpected actions. MCUXpresso for VS Code’s debug features cannot offer protection from such occurrences.

Custom SVD File

MCUXpresso for VS Code tries to automatically detect the appropriate SVD from the information provided in the SDK. However, the path to the SVD can also be manually provided by setting the svdPath property in the launch configuration present in .vscode/launch.json:

"svdPath": "C:/sdks/mcux-sdk/svd/MIMXRT1176/MIMXRT1176_cm7.xml"

home