![]() |
BSL430.NET
1.3.4
|
BSL430.NET is cross-platform toolkit to manage memory of MSP430 MCUs via UART (FTDI, libftdi), USB or Serial (COM) port. It is a cheap replacement for stock TI MSP-FET programmer without debug capability. It can Upload, Download, Erase and Scan. More...
Public Member Functions | |
| BSL430NET () | |
| Use this constructor to exec ScanAll method only. Any other methods will return error. More... | |
| BSL430NET (Mode Mode) | |
| Use this constructor for standard, lifelong library operations, and also when you dont know device already. More... | |
| BSL430NET (Bsl430NetDevice DefaultDevice) | |
| Use this constructor when target device is already known and Bsl430NetDevice object is present from previous scan. More... | |
| BSL430NET (string DefaultDeviceName) | |
| Use this constructor when target device name is already known eg. COM1, FTDI2, libftdi3, usb4. Case doesnt matter. More... | |
| ScanAllResult | ScanAllEx (ScanOptions ScanOpt=ScanOptions.None) |
| Detailed Scan for all available devices in multimode (FTDI, libftdi, USB and Serial). Returns ScanAllResult with 4 specific ScanResult classes, each with Status and List of Devices - Bsl430NetDevice childs. More... | |
| ScanResult< Bsl430NetDevice > | ScanAll (ScanOptions ScanOpt=ScanOptions.None) |
| Scan for all available devices in multimode (FTDI, libftdi, USB and Serial). Returns generic ScanResult class with Status and List of Devices - Bsl430NetDevice. More... | |
| ScanResult< Tdev > | Scan< Tdev > (ScanOptions ScanOpt=ScanOptions.None) |
| Detailed Scan for available devices in single mode (FTDI / libftdi / USB / Serial). Returns generic ScanResult class with Status and List of Devices - Bsl430NetDevice. More... | |
| StatusEx | Erase (Bsl430NetDevice Device=null) |
| Erase deletes the entire flash memory area except Information Memory if protocol 5xx6xx is used. Please see MCU datasheet for detailed information, or TI BSL doc (slau319t.pdf). More... | |
| StatusEx | Erase (string DeviceName) |
| Erase deletes the entire flash memory area except Information Memory if protocol 5xx6xx is used. Please see MCU datasheet for detailed information, or TI BSL doc (slau319t.pdf). device_name case dont matter. More... | |
| StatusEx | Upload (string FirmwarePath, Bsl430NetDevice Device=null, byte[] Password=null) |
| Uploads data from firmware_path to target MCU. Supported file formats are TI-TXT, Intel-HEX and ELF. If none, null or invalid password is entered, mass erase is executed first. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte. More... | |
| StatusEx | Upload (string FirmwarePath, string DeviceName, byte[] Password=null) |
| Uploads data from firmware_path to target MCU. Supported file formats are TI-TXT, Intel-HEX and ELF. If none, null or invalid password is entered, mass erase is executed first. device_name case dont matter. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte. More... | |
| StatusEx | Download (byte[] Password, int AddrStart, int DataSize, out List< byte > Data, Bsl430NetDevice Device=null) |
| Downloads bytes from target MCU starting from address AddrStart to AddrStart + DataSize. If wrong password is entered, mass erase is auto executed as a safety measure, erasing entire flash. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte. More... | |
| StatusEx | Download (byte[] Password, int AddrStart, int DataSize, out List< byte > Data, string DeviceName) |
| Downloads bytes from target MCU starting from address AddrStart to AddrStart + DataSize. If wrong password is entered, mass erase is auto executed as a safety measure, erasing entire flash. device_name case dont matter. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte. More... | |
| Status | SetBaudRate (BaudRate BaudRate) |
| Sets baud rate. Default is 9600 bps. Baud rate is applicable only in UART mode and only in some BSL revs. More... | |
| Status | SetInvokeMechanism (InvokeMechanism InvokeMechanism) |
| Sets invoke mechanism mode. Default is DTR_RST__RTS_TEST. Note that USB HID mode requires manual BSL invocation. More... | |
| Status | SetMCU (MCU Mcu) |
| Sets MCU family. Default is MSP430_F5xx. Please see TI BSL doc (slau319t.pdf) for supported MCUs and their modes. More... | |
| BaudRate | GetBaudRate () |
| Returns currently set baud rate. More... | |
| InvokeMechanism | GetInvokeMechanism () |
| Returns currently set invoke mechanism. More... | |
| MCU | GetMCU () |
| Returns currently set MCU family. More... | |
| Mode | GetMode () |
| Returns current BSL430.NET instance operating mode (UART_FTDXX, UART_libftdi, UART_Serial, USB_HID). More... | |
| void | Dispose () |
| Closes device, disposes all handles and suppresses any errors. More... | |
| override string | ToString () |
| Returns string of current instance mode and default device name. More... | |
Static Public Member Functions | |
| static void | Interrupt () |
| Interrupts all current processes in all intances by initiating a throw of an exception, effectively breaking anything in progress. This method is just not recommended to call, however it is the only way how perform "valid" termination, when user requires immediate hard stop, without using stuff like thread terminate. It will invalidate current action, but resources will stay safe. Delay of effect is variable, but less than 1s. More... | |
Package Functions | |
| BSL430NET (Core CoreInjection) | |
| Dependecny injection constructor useful for unit testing. More... | |
| BSL430NET (object CoreInjection) | |
| Dependecny injection constructor useful for unit testing. More... | |
| void | ProgressUpdate (double Progress, Report Report) |
Properties | |
| Bsl430NetDevice | DefaultDevice [get, set] |
| DefaultDevice is useful when call public methods without explicitly declaring target device. More... | |
| static bool | Interrupted [get, set] |
Events | |
| Bsl430NetEventHandler | ProgressChanged = null |
| Event fired when progress of main action changes eg. Open -> Set -> Uploading 1 batch -> next batch ... More... | |
Private Member Functions | |
| void | Bsl430NetInit (Mode Mode, Bsl430NetDevice Device=null) |
Private Attributes | |
| IDevice | dev |
| Mode | mode |
| Bsl430NetDevice | defaultDevice = new Bsl430NetDevice() |
Static Private Attributes | |
| static bool | _Interrupted = false |
BSL430.NET is cross-platform toolkit to manage memory of MSP430 MCUs via UART (FTDI, libftdi), USB or Serial (COM) port. It is a cheap replacement for stock TI MSP-FET programmer without debug capability. It can Upload, Download, Erase and Scan.
| BSL430_NET.BSL430NET.BSL430NET | ( | ) |
Use this constructor to exec ScanAll method only. Any other methods will return error.
| BSL430_NET.BSL430NET.BSL430NET | ( | Mode | Mode | ) |
Use this constructor for standard, lifelong library operations, and also when you dont know device already.
| BSL430_NET.BSL430NET.BSL430NET | ( | Bsl430NetDevice | DefaultDevice | ) |
Use this constructor when target device is already known and Bsl430NetDevice object is present from previous scan.
| BSL430_NET.BSL430NET.BSL430NET | ( | string | DefaultDeviceName | ) |
Use this constructor when target device name is already known eg. COM1, FTDI2, libftdi3, usb4. Case doesnt matter.
|
package |
Dependecny injection constructor useful for unit testing.
|
package |
Dependecny injection constructor useful for unit testing.
| void BSL430_NET.BSL430NET.Dispose | ( | ) |
Closes device, disposes all handles and suppresses any errors.
| StatusEx BSL430_NET.BSL430NET.Download | ( | byte[] | Password, |
| int | AddrStart, | ||
| int | DataSize, | ||
| out List< byte > | Data, | ||
| Bsl430NetDevice | Device = null |
||
| ) |
Downloads bytes from target MCU starting from address AddrStart to AddrStart + DataSize. If wrong password is entered, mass erase is auto executed as a safety measure, erasing entire flash. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte.
Implements BSL430_NET.IBsl430Net.
| StatusEx BSL430_NET.BSL430NET.Download | ( | byte[] | Password, |
| int | AddrStart, | ||
| int | DataSize, | ||
| out List< byte > | Data, | ||
| string | DeviceName | ||
| ) |
Downloads bytes from target MCU starting from address AddrStart to AddrStart + DataSize. If wrong password is entered, mass erase is auto executed as a safety measure, erasing entire flash. device_name case dont matter. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte.
Implements BSL430_NET.IBsl430Net.
| StatusEx BSL430_NET.BSL430NET.Erase | ( | Bsl430NetDevice | Device = null | ) |
Erase deletes the entire flash memory area except Information Memory if protocol 5xx6xx is used. Please see MCU datasheet for detailed information, or TI BSL doc (slau319t.pdf).
Implements BSL430_NET.IBsl430Net.
| StatusEx BSL430_NET.BSL430NET.Erase | ( | string | DeviceName | ) |
Erase deletes the entire flash memory area except Information Memory if protocol 5xx6xx is used. Please see MCU datasheet for detailed information, or TI BSL doc (slau319t.pdf). device_name case dont matter.
Implements BSL430_NET.IBsl430Net.
| BaudRate BSL430_NET.BSL430NET.GetBaudRate | ( | ) |
Returns currently set baud rate.
Implements BSL430_NET.IBsl430Net.
| InvokeMechanism BSL430_NET.BSL430NET.GetInvokeMechanism | ( | ) |
Returns currently set invoke mechanism.
Implements BSL430_NET.IBsl430Net.
| MCU BSL430_NET.BSL430NET.GetMCU | ( | ) |
Returns currently set MCU family.
Implements BSL430_NET.IBsl430Net.
| Mode BSL430_NET.BSL430NET.GetMode | ( | ) |
Returns current BSL430.NET instance operating mode (UART_FTDXX, UART_libftdi, UART_Serial, USB_HID).
Implements BSL430_NET.IBsl430Net.
|
static |
Interrupts all current processes in all intances by initiating a throw of an exception, effectively breaking anything in progress. This method is just not recommended to call, however it is the only way how perform "valid" termination, when user requires immediate hard stop, without using stuff like thread terminate. It will invalidate current action, but resources will stay safe. Delay of effect is variable, but less than 1s.
| ScanResult<Tdev> BSL430_NET.BSL430NET.Scan< Tdev > | ( | ScanOptions | ScanOpt = ScanOptions.None | ) |
Detailed Scan for available devices in single mode (FTDI / libftdi / USB / Serial). Returns generic ScanResult class with Status and List of Devices - Bsl430NetDevice.
| Bsl430NetException |
Implements BSL430_NET.IBsl430Net.
| Tdev | : | Bsl430NetDevice |
| ScanResult<Bsl430NetDevice> BSL430_NET.BSL430NET.ScanAll | ( | ScanOptions | ScanOpt = ScanOptions.None | ) |
Scan for all available devices in multimode (FTDI, libftdi, USB and Serial). Returns generic ScanResult class with Status and List of Devices - Bsl430NetDevice.
| Bsl430NetException |
Implements BSL430_NET.IBsl430Net.
| ScanAllResult BSL430_NET.BSL430NET.ScanAllEx | ( | ScanOptions | ScanOpt = ScanOptions.None | ) |
Detailed Scan for all available devices in multimode (FTDI, libftdi, USB and Serial). Returns ScanAllResult with 4 specific ScanResult classes, each with Status and List of Devices - Bsl430NetDevice childs.
| Bsl430NetException |
Implements BSL430_NET.IBsl430Net.
Sets baud rate. Default is 9600 bps. Baud rate is applicable only in UART mode and only in some BSL revs.
Implements BSL430_NET.IBsl430Net.
| Status BSL430_NET.BSL430NET.SetInvokeMechanism | ( | InvokeMechanism | InvokeMechanism | ) |
Sets invoke mechanism mode. Default is DTR_RST__RTS_TEST. Note that USB HID mode requires manual BSL invocation.
Implements BSL430_NET.IBsl430Net.
Sets MCU family. Default is MSP430_F5xx. Please see TI BSL doc (slau319t.pdf) for supported MCUs and their modes.
Implements BSL430_NET.IBsl430Net.
| override string BSL430_NET.BSL430NET.ToString | ( | ) |
Returns string of current instance mode and default device name.
| StatusEx BSL430_NET.BSL430NET.Upload | ( | string | FirmwarePath, |
| Bsl430NetDevice | Device = null, |
||
| byte[] | Password = null |
||
| ) |
Uploads data from firmware_path to target MCU. Supported file formats are TI-TXT, Intel-HEX and ELF. If none, null or invalid password is entered, mass erase is executed first. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte.
Implements BSL430_NET.IBsl430Net.
| StatusEx BSL430_NET.BSL430NET.Upload | ( | string | FirmwarePath, |
| string | DeviceName, | ||
| byte[] | Password = null |
||
| ) |
Uploads data from firmware_path to target MCU. Supported file formats are TI-TXT, Intel-HEX and ELF. If none, null or invalid password is entered, mass erase is executed first. device_name case dont matter. Password is last 16-byte (F543x-non-A only) or 32-byte (others) of IVT (FFE0-FFFF), if newer 5xx/6xx MCU is used. If MCU from older series is used (1xx/2xx/4xx), password is exactly 20-byte long. Mostly it is 32-byte.
Implements BSL430_NET.IBsl430Net.
|
getset |
DefaultDevice is useful when call public methods without explicitly declaring target device.
| Bsl430NetEventHandler BSL430_NET.BSL430NET.ProgressChanged = null |
Event fired when progress of main action changes eg. Open -> Set -> Uploading 1 batch -> next batch ...
1.8.16