From c0bc1f0760a44019e735a31e32cec2537e6dc690 Mon Sep 17 00:00:00 2001 From: bvernoux Date: Wed, 11 Feb 2015 20:44:40 +0100 Subject: [PATCH] Version 0.5-beta with new USB VID_0x1d50/PID_0x60a7 using OpenMoko HydraFW --- 09-hydrabus.rules | 4 ++-- CHANGELOG.md | 32 +++++++++++++++++++++++++++++ common/usb1cfg.c | 14 +++++++------ common/usb2cfg.c | 16 ++++++++------- driver_usb_cdc/hydrabus_usb_cdc.inf | 4 ++-- 5 files changed, 53 insertions(+), 17 deletions(-) diff --git a/09-hydrabus.rules b/09-hydrabus.rules index 00615df8..ca9c150f 100644 --- a/09-hydrabus.rules +++ b/09-hydrabus.rules @@ -3,5 +3,5 @@ # To install, type this command in a terminal: # sudo cp 09-hydrabus.rules /etc/udev/rules.d/09-hydrabus.rules # -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0664", GROUP="plugdev" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60a7", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60a7", MODE="0664", GROUP="plugdev" diff --git a/CHANGELOG.md b/CHANGELOG.md index 85a12058..68d44d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,38 @@ # CHANGELOG of 'hydrafw' ---------------------- +#### 11.02.2015 - [HydraFW v0.5 Beta](https://github.com/bvernoux/hydrafw/releases/tag/v0.5-beta) +* New USB VID_0x1d50/PID_0x60a7 using OpenMoko HydraFW, update with new drivers + * Windows see driver_usb_cdc/hydrabus_usb_cdc.inf + * Linux see 09-hydrabus.rules +* Added USB DFU boot by pressing UBTN at PowerOn/RESET for easier future update of the firmware (does not requires any wire). +* Added Log command (thanks to biot): + * Log all commands/answer in the Terminal to HydraBus SD card file: `logging` `on` `off` `sd` +* Added command `debug` `test-rx` (debug rx) in order to test USB CDC reception performance. +* Added PWM command: + * Configurable PWM frequency between 1Hz to 42MHz and duty cycle from 0 to 100%: `pwm`, `frequency`, `duty-cycle` + * Give feedback of real PWM frequency & duty cycle after configuration. +* Added DAC command: + * Configurable DAC1(PA4 used by ULED) or DAC2(PA5) with following modes: + * `raw` (0 to 4095), `volt` (0 to 3.3), also returns feedback of raw/volt DAC value after configuration. + * `triangle` (5Hz / 3.3V Amplitude), `noise` (0 to 3.3V Amplitude) + * `dac exit` disable DAC1/2 & Timer6/7 and reinit GPIO for PA4 & PA5 +* UART: + * UART returns real baud rate+% error after configuration. + * Check and correct min/max value for UART baudrate. +* I2C added `scan` (thanks to biot). +* SPI: + * Fixed `cs` `on` / `off` bug with Infinite Loop. + * Fixed SPI mode `slave`. + * Fixed configuration for `phase` & `polarity` (was always set to 0). +* HydraNFC: + * Fixed HydraNFC detection/init/cleanup and autonomous sniffer mode started with K4. + * Fixed some potential problems/crash with scan/continuous. +* Add full help for commands. +* Lot of cleanup and fixes in code. + +--- + #### 19.12.2014 - [HydraFW v0.4 Beta](https://github.com/bvernoux/hydrafw/releases/tag/v0.4-beta) * Major improvement/refactoring towards terminal/syntax using tokenline (instead of microrl) thanks to Bert Vermeulen (biot) for that amazing piece of software and all the work on this project. * New commands added: diff --git a/common/usb1cfg.c b/common/usb1cfg.c index 503fdf75..03607cb8 100644 --- a/common/usb1cfg.c +++ b/common/usb1cfg.c @@ -17,6 +17,9 @@ limitations under the License. #include "ch.h" #include "hal.h" +#define VENDOR_ID 0x1d50 +#define PRODUCT_ID 0x60a7 + /* * Endpoints to be used for USBD1. */ @@ -34,8 +37,8 @@ static const uint8_t vcom_device_descriptor_data[18] = { 0x00, /* bDeviceSubClass. */ 0x00, /* bDeviceProtocol. */ 0x40, /* bMaxPacketSize. */ - 0x0483, /* idVendor (ST). */ - 0x5740, /* idProduct. */ + VENDOR_ID, /* idVendor. */ + PRODUCT_ID, /* idProduct. */ 0x0200, /* bcdDevice. */ 1, /* iManufacturer. */ 2, /* iProduct. */ @@ -155,11 +158,10 @@ static const uint8_t vcom_string0[] = { * Vendor string. */ static const uint8_t vcom_string1[] = { - USB_DESC_BYTE(38), /* bLength. */ + USB_DESC_BYTE(30), /* bLength. */ USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */ - 'S', 0, 'T', 0, 'M', 0, 'i', 0, 'c', 0, 'r', 0, 'o', 0, 'e', 0, - 'l', 0, 'e', 0, 'c', 0, 't', 0, 'r', 0, 'o', 0, 'n', 0, 'i', 0, - 'c', 0, 's', 0 + 'O', 0, 'p', 0, 'e', 0, 'n', 0, 'm', 0, 'o', 0, 'k', 0, 'o', 0, + ',', 0, ' ', 0, 'I', 0, 'n', 0, 'c', 0, '.', 0 }; /* diff --git a/common/usb2cfg.c b/common/usb2cfg.c index 5a39ba6d..a709723b 100644 --- a/common/usb2cfg.c +++ b/common/usb2cfg.c @@ -17,6 +17,9 @@ limitations under the License. #include "ch.h" #include "hal.h" +#define VENDOR_ID 0x1d50 +#define PRODUCT_ID 0x60a7 + /* * Endpoints to be used for USBD2. */ @@ -34,8 +37,8 @@ static const uint8_t vcom_device_descriptor_data[18] = { 0x00, /* bDeviceSubClass. */ 0x00, /* bDeviceProtocol. */ 0x40, /* bMaxPacketSize. */ - 0x0483, /* idVendor (ST). */ - 0x5740, /* idProduct. */ + VENDOR_ID, /* idVendor. */ + PRODUCT_ID, /* idProduct. */ 0x0200, /* bcdDevice. */ 1, /* iManufacturer. */ 2, /* iProduct. */ @@ -152,11 +155,10 @@ static const uint8_t vcom_string0[] = { * Vendor string. */ static const uint8_t vcom_string1[] = { - USB_DESC_BYTE(38), /* bLength. */ - USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */ - 'S', 0, 'T', 0, 'M', 0, 'i', 0, 'c', 0, 'r', 0, 'o', 0, 'e', 0, - 'l', 0, 'e', 0, 'c', 0, 't', 0, 'r', 0, 'o', 0, 'n', 0, 'i', 0, - 'c', 0, 's', 0 + USB_DESC_BYTE(30), /* bLength. */ + USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */ + 'O', 0, 'p', 0, 'e', 0, 'n', 0, 'm', 0, 'o', 0, 'k', 0, 'o', 0, + ',', 0, ' ', 0, 'I', 0, 'n', 0, 'c', 0, '.', 0 }; /* diff --git a/driver_usb_cdc/hydrabus_usb_cdc.inf b/driver_usb_cdc/hydrabus_usb_cdc.inf index a571a7ed..a544a755 100644 --- a/driver_usb_cdc/hydrabus_usb_cdc.inf +++ b/driver_usb_cdc/hydrabus_usb_cdc.inf @@ -80,10 +80,10 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys [SourceDisksFiles] [SourceDisksNames] [DeviceList] -%DESCRIPTION%=DriverInstall, USB\VID_0483&PID_5740 +%DESCRIPTION%=DriverInstall, USB\VID_1D50&PID_60A7 [DeviceList.NTamd64] -%DESCRIPTION%=DriverInstall, USB\VID_0483&PID_5740 +%DESCRIPTION%=DriverInstall, USB\VID_1D50&PID_60A7 ;------------------------------------------------------------------------------