User Guide - ifr#
This user’s guide describes how to use ifr application.
Command line interface#
ifr#
Utility for generating and parsing IFR. Please note that IFR0 ROMCFG region is one-time-programmable only.
ifr [OPTIONS] COMMAND [ARGS]...
Options
- -v, --verbose#
Print more detailed information
- -vv, --debug#
Display more debugging information.
- --version#
Show the version and exit.
- --help#
Show this message and exit.
generate-binary#
Generate binary data.
ifr generate-binary [OPTIONS]
Options
- -f, --family <family>#
Select the chip family.
- Options:
k32w1xx | kw45xx | mcxw71xx
- -r, --revision <revision>#
Chip revision; if not specified, most recent one will be used
- -c, --config <config>#
Required Path to the YAML/JSON configuration file.
- -o, --output <output>#
Save the output into a file instead of console
get-template#
Generate user configuration template file.
ifr get-template [OPTIONS]
Options
- -o, --output <output>#
Save the output into a file instead of console
- --force#
Force overwriting of existing files.
- -s, --sector <sector>#
Select IFR sector
- Options:
ROMCFG | CMACTable
- -f, --family <family>#
Required Device to use
- Options:
k32w1xx | kw45xx | mcxw71xx
- -r, --revision <revision>#
Chip revision; if not specified, most recent one will be used
- --full#
Show full config, including computed values
parse-binary#
Parse binary and extract configuration.
ifr parse-binary [OPTIONS]
Options
- -s, --sector <sector>#
Select IFR sector
- Options:
ROMCFG | CMACTable
- -f, --family <family>#
Required Device to use
- Options:
k32w1xx | kw45xx | mcxw71xx
- -r, --revision <revision>#
Chip revision; if not specified, most recent one will be used
- -o, --output <output>#
Save the output into a file instead of console
- -b, --binary <binary>#
Required Binary to parse
- -d, --show-diff#
Show differences comparing to defaults
read#
Read IFR page from the device.
ifr read [OPTIONS]
Options
- -p, --port <COM[,speed>#
Serial port configuration. Default baud rate is 57600. Use ‘nxpdevscan’ utility to list devices on serial port.
- -u, --usb <VID:PID|USB_PATH|DEV_NAME>#
USB device identifier. | Following formats are supported: <vid>, <vid:pid> or <vid,pid>, device/instance path, device name. | <vid>: hex or dec string; e.g. 0x0AB12, 43794. | <vid/pid>: hex or dec string; e.g. 0x0AB12:0x123, 1:3451. | Use ‘nxpdevscan’ utility to list connected device names.
- -sd, --sdio <SDIO_PATH|DEV_NAME>#
SDIO device identifier.
Following formats are supported: device/instance path, device name.device/instance path: device string; e.g. /dev/mcu-sdio.Use ‘nxpdevscan’ utility to list connected device names.
- -l, --lpcusbsio <usb,VID:PID|USB_PATH|SER_NUM,]spi|i2c>#
USB-SIO bridge interface.
Optional USB device filtering formats: [usb,vid:pid|usb_path|serial_number]
Following serial interfaces are supported:
spi[index][,port,pin,speed_kHz,polarity,phase]- index … optional index of SPI peripheral. Example: “spi1” (default=0)- port … bridge GPIO port used as SPI SSEL(default=0)- pin … bridge GPIO pin used as SPI SSELdefault SSEL is set to 0.15 which worksfor the LPCLink2 bridge. The MCULink OBbridge ignores the SSEL value anyway.(default=15)- speed_kHz … SPI clock in kHz (default 1000)- polarity … SPI CPOL option (default=1)- phase … SPI CPHA option (default=1)i2c[index][,address,speed_kHz]- index … optional index of I2C peripheral. Example: “i2c1” (default=0)- address … I2C device address (default 0x10)- speed_kHz … I2C clock in kHz (default 100)
- -cb, --can <interface[,channel,bitrate,rxid,txid>#
CAN Bus settings
interface[,channel,bitrate,rxid,txid]- interface … CAN interface name (refer to python-can library)- channel … CAN channel number- bitrate … CAN bitrate (default=1000000)- rxid … default arbitration ID for RX (default=0x123)- txid … default arbitration ID for TX (default=0x321)
- -b, --buspal <spi[,speed,polarity,phase,lsb|msb] | i2c[,address,speed>#
Buspal settings
- -x, --plugin <identifier=PLUGIN_IDENTIFIER[,param1=value1,param2=value2>#
Plugin interface settings.
Following format of plugin setting is supported:
identifier=<PLUGIN_IDENTIFIER>[,<key1>=<value1>,<key2>=<value2>,…]- <PLUGIN_IDENTIFIER>: Corresponds to the ‘identifier’ attribute of the plugin class- <key1>=<value1>: Represent a single interface parameterOptional interface settings:- Any number of optional <key>=<value> scan settings separated by comma can be defined- The <key>=<value> pairs are used as keyword parameters for ‘scan’ method of a plugin class
- --timeout <ms>#
Sets timeout when waiting on data over a serial line. The default is 5000 milliseconds.
- -s, --sector <sector>#
Select IFR sector
- Options:
ROMCFG | CMACTable
- -f, --family <family>#
Required Device to use
- Options:
k32w1xx | kw45xx | mcxw71xx
- -r, --revision <revision>#
Chip revision; if not specified, most recent one will be used
- -o, --output <output>#
Store IFR data into a file. If not specified hexdump data into stdout.
- -y, --yaml <yaml_output>#
Parse data read from device into YAML config.
- -d, --show-diff#
(applicable for parsing) Show differences comparing to defaults
write#
Write IFR page to the device.
ifr write [OPTIONS]
Options
- -p, --port <COM[,speed>#
Serial port configuration. Default baud rate is 57600. Use ‘nxpdevscan’ utility to list devices on serial port.
- -u, --usb <VID:PID|USB_PATH|DEV_NAME>#
USB device identifier. | Following formats are supported: <vid>, <vid:pid> or <vid,pid>, device/instance path, device name. | <vid>: hex or dec string; e.g. 0x0AB12, 43794. | <vid/pid>: hex or dec string; e.g. 0x0AB12:0x123, 1:3451. | Use ‘nxpdevscan’ utility to list connected device names.
This option can be omitted if ‘–family’ option is used.
- -sd, --sdio <SDIO_PATH|DEV_NAME>#
SDIO device identifier.
Following formats are supported: device/instance path, device name.device/instance path: device string; e.g. /dev/mcu-sdio.Use ‘nxpdevscan’ utility to list connected device names.
- -l, --lpcusbsio <usb,VID:PID|USB_PATH|SER_NUM,]spi|i2c>#
USB-SIO bridge interface.
Optional USB device filtering formats: [usb,vid:pid|usb_path|serial_number]
Following serial interfaces are supported:
spi[index][,port,pin,speed_kHz,polarity,phase]- index … optional index of SPI peripheral. Example: “spi1” (default=0)- port … bridge GPIO port used as SPI SSEL(default=0)- pin … bridge GPIO pin used as SPI SSELdefault SSEL is set to 0.15 which worksfor the LPCLink2 bridge. The MCULink OBbridge ignores the SSEL value anyway.(default=15)- speed_kHz … SPI clock in kHz (default 1000)- polarity … SPI CPOL option (default=1)- phase … SPI CPHA option (default=1)i2c[index][,address,speed_kHz]- index … optional index of I2C peripheral. Example: “i2c1” (default=0)- address … I2C device address (default 0x10)- speed_kHz … I2C clock in kHz (default 100)
- -cb, --can <interface[,channel,bitrate,rxid,txid>#
CAN Bus settings
interface[,channel,bitrate,rxid,txid]- interface … CAN interface name (refer to python-can library)- channel … CAN channel number- bitrate … CAN bitrate (default=1000000)- rxid … default arbitration ID for RX (default=0x123)- txid … default arbitration ID for TX (default=0x321)
- -b, --buspal <spi[,speed,polarity,phase,lsb|msb] | i2c[,address,speed>#
Buspal settings
- -x, --plugin <identifier=PLUGIN_IDENTIFIER[,param1=value1,param2=value2>#
Plugin interface settings.
Following format of plugin setting is supported:
identifier=<PLUGIN_IDENTIFIER>[,<key1>=<value1>,<key2>=<value2>,…]- <PLUGIN_IDENTIFIER>: Corresponds to the ‘identifier’ attribute of the plugin class- <key1>=<value1>: Represent a single interface parameterOptional interface settings:- Any number of optional <key>=<value> scan settings separated by comma can be defined- The <key>=<value> pairs are used as keyword parameters for ‘scan’ method of a plugin class
- --timeout <ms>#
Sets timeout when waiting on data over a serial line. The default is 5000 milliseconds.
- -s, --sector <sector>#
Select IFR sector
- Options:
ROMCFG | CMACTable
- -f, --family <family>#
Required Device to use
- Options:
k32w1xx | kw45xx | mcxw71xx
- -r, --revision <revision>#
Chip revision; if not specified, most recent one will be used
- -b, --binary <binary>#
Path to IFR data to write.
- -y, --yaml <yaml_config>#
Path to the PFR YAML config to write.