2023年12月24日 星期日

Malahit DSP1 SDR firmware update Q&A

I bought Malahit(Malachite DSP1) SDR from Taobao long time ago. I am interested about its wide frequency range, integrated LCD screen for spectrum display and demodulation, decoding to work as a standalone receiver without connecting to the computer. 

I just played it for a short time to check OK in function and left it in the drawer. Recently I took it out again and can't turn it on anymore after charging. It intrigued me to study more about the Malahit SDR. After reading the review document from Al Hearn(WA4GKQ) to know the history of the DSP1/DSP2/DSP3 and found the firmware release/update much confused to the users(Is the machine cloned ? What firmware can I update ? Can I bring the bricked machine back to purchase an activation code ? ...). The outlook, operation menu with test firmware and PCB of the DSP1 clone is shown below




From the PCB picture down left corner, you can see the FRAM chip(FM25W256) is not populated, so it will not store the last state at power-off and it start with initial state each time power-on. In addition, the original design team also store the activation info over the FRAM. If you load the formal released firmware for the machine without FRAM, it will be bricked. Firmware notation FW1.x/FW2.x/FW3.x means they are worked for DSP1/DSP2/DSP3 separately, wrong load the firmware will also brick your machine.

The bricked Malahit DSPx means,
a. No display when try to turn-on
b. Not into DFU mode(long push VOL button) when connect USB to computer

Besides lock the DSP1 with activation code, the original design team continue to improve the Malahit SDR in hardware and software and migrate the DSP1 to DSP2 and DSP3. The  start splash screen and operation menu is shown below. It is much different than the clone machine.



Before update firmware for the DSP1 clone
a. check if the FRAM chip(FM25W256) populated(see picture, above the SWD interface J2). If it is absent, the only workable firmware is “Reciever_msi001.hex”. If you try to update other firmware, it will brick your machine. Maybe the formal released firmware is tried to talk the FRAM and hang there without response
b. With FRAM installed, you can try FW 1.10a and calculate the activation code from website(reference 1).
c. Or you can try to find the patched firmware and update the DSP1 to the latest released FW 1.10d(reference 5)
d. For sure, buy the machine from original design team and don’t bother the FRAM chip soldering and firmware patch stuff
 
There are three ways to update the firmware
Method 1: put DSP1 in DFU mode and update the FW thru USB interface with STM32CubeProgrammer
Method 2: update the FW thru SWD interface with ST-Link(I borrowed the ST-Link interface from STM32F03Discovery EVB)
Method 3: put the DSP1 in DFU mode with board jumper(remove all the power, then short circuit JP1). This method worked for the bricked machine.
I worked in method 1 and 3 but never succeeded in method 2(I found why I can’t work method 2, the wrong connected SWD pin order😅, try next time)

*load with the test firmware, find no way to enter DFU mode with different button combination so go method 3 to enter DFU mode to update firmware. Remember to remove the JP1 short circuit after firmware update.
*other function for VOL and FREQ encoder 
=> long push VOL, then Power on to enter DFU mode(old)
=> long push both VOL & FREQ, then Power on to enter DFU mode(new)
=> long push VOL in power-on state to disable the capacitive touch screen
=> long push VOL & FREQ in power-on state to reset the machine
*With the same MSi001 silicon tuner chip, the SDRPlay’s receiver can cover the frequency gap from 250MHz to 400MHz. The Malahit SDR should also work that range with less sensitivity.

After populated FRAM chip over PCB and update the patched 1.10d firmware(rev 2 actually), the clone DSP1 is OK to work with much features and it can keep the last operation status!






Reference
0. Al Hearn WA4GKQ summary for Malahit DSP SDR
https://www.facebook.com/groups/malahitsdr/permalink/236094142500945/
 
1. Emil's Projects & Reviews - Malahit Software Defined Radio
https://uglyduck.vajn.icu/ep/archive/2020/12/Malahit_Software_Defined_Radio.html
 
2. N9EWO Reviews :  Malahit (Malachite)
https://www.qsl.net/n9ewo/malahit.html
 
3. Malachite DSP - SDR  Radio Receiver
https://linuxslate.com/cgi-bin/forum/YaBB.pl?num=1595619341
 
4. Kurt Poulsen discussion in Group IO
https://groups.io/g/malahit/topic/restore_demo_software/80260700?20

5. Malahit Malachite Patched Firmware Upgrade via DFU

 

Appendix A: Key specifications of the Malahit DSP1 SDR
1. SDR Architecture - The functionality is determined by on board software.
2. Frequency Coverage : 10 kHz to 250 MHz and from 400 MHz to 2 GHz. (low 10 hz coverage was added with 1.10d Rev2 firmware)
3. Receiving Modes : AM, USB, LSB, NFM, WFM (adding CW, DSB and Synchronous Detection modes with firmware 1.10b).
4. Additional Features : RDS function with firmware 1.0b and up. Built in Morse Code Decoder, Variable filter width, adaptive squelch, threshold squelch, Noise Blanker, AGC, equalizer, FM Stereo with headphones (adding auto notch filter with firmware 1.10b for SSB modes and 1.10c for AM mode).
5. Mirics MSi001 multi mode tuner IC to achieve low cost.
6. Powerful STM32H743 Microprocessor with a clock frequency of 480 MHz.
7. 3.5-inch display with a capacitive touchscreen.
8. Built-in selectable pre-amp.
9. Receiver control is achieved with 2 front mounted rotary mechanical encoders (push in type) with a LCD touch screen.
10. Operational Power provided by internal lithium ion battery and or via USB (charging via USB). Capacity of the built-in battery is at least 1500mAh.
11. Low Power consumption - 300mA when using headphones.
12a. Top mounted female SMA jack for use with telescopic or external antennas.
12b. For improved HF reception with the high impedance telescopic antenna and more frontend filters, an optional board is provided.
13. Micro B USB(USB type C in the clone) for connection to a computer with the ability to transfer CAT, IQ and audio.
14. 160 kHz spectrum display span with scalability.
15. Sensitivity - 0.3 μV at frequencies up to 1 GHz.
16. Dynamic range approx. 85dB, due to characteristics of the Mirics MSi001 IC.
17. Robust aluminum body.
18. Display backlight control.
19. Dimensions : 120 x 88 x 39mm (4.72 x 3.46 x 1.53 inches).
 
Appendix B: Malahit DSP1 clone with test firmware
In the cloned Malahit DSP1 without activation, only a test firmware can be loaded, which is quite a receiver, but it does not know how to do a lot of things and has a lot of differences from the firmware that requires activation(described from the original design team)

1. the frequency range is limited to 250MHz
2. there is no stereo FM reception [Also no RDS]
3. there is no frequency error correction
4. there is no USB connections [Except charging -- Radio control and audio interfaces appear, but do not work]
5. a stick or a hole in the middle of the spectrum
6. there is no support for a shield with a power supply  
7. there is no normal msi001 gain control, which will cause problems when working on large antennas
8. an inconvenient interface
9. a brake interface - low fps and a long response to controls
10. no normal selection of the frequency step
11. no normal AGC
12. no frequency input function [No Direct frequency entry]
13. there is no display off function to minimize interference [Display timeout does work]
14. high consumption in the off state - 10mA
15. no visual spectrum and waterfall settings - there are many settings
16. there are clicks during restructuring
17. no telegraph decoder [No CW (Morse Code) Decoder.]
18. the number of memory cells is less and in them not all settings are saved
19. the interference from the display is much larger
With the test firmware, the clone DSP1 is a usable shortwave/VHF multi mode radio, but performance is not as good as commercial receivers due to the interference and AGC issues
 


Appendix C: Firmware Change Log
1.0a:
- added S-meter calibration
- S-meter error has been fixed due to which previously signals above 59 + 20dB were not   visible
- sound indication is entered during manual shutdown or touchscreen
- sound off indication is entered
- fixed frequency correction error (parameter F correct)
- introduced the function of filling the panorama - the FFT fill parameter in the HARD   menu
- added turning off the touch screen with a long press on the sound encoder
- something in the little things
 
1.0b:
- added RDS reception in WFM - to enable RDS, you need to click on the waterfall field   when receiving in WFM. RDS reception is only possible if the RDS level is high enough
- fixed bug of filter switching on additional board
- fixed error in msi001 settings - receiver at 50MHz goes through, without hole at 50MHz
- added a parameter to the hard menu - BEEP LVL - the volume of the tone when you press   the controls
- some minor bugs fixed

 1.0c:
- dsp filter settings are moved to the hard menu;
- added three operatively switchable filters - selection by means of a sound encoder;
- introduced deceleration of the encoder when switching pages band;
- introduced the deceleration of the sound encoder when switching the filter;
- minor fixes in the RDS part;
- in RDS mode added frequency markers 19, 38 and 57 kHz;
- minor improvements and bug fixes;

 1.0d:
- fixed USB operation - USB was unstable on version 1.0c
- protection against false switching is made - when switching on, press the button 3 times     within an interval of 5 seconds
 
1.0e:
- a possibly critical error has been fixed - there was an incorrect work with memory and   there could be problems with data processing;
- added additional characters in the font, when displaying RDS and CW decoder   information;
- corrected S-meter - now more accurate S scales;
- added the ability to indicate the signal level in dBm - in the HARD menu, the "Ind type"   parameter. Readings are displayed to the right of the S meter scale.
 
1.0f:
- introduced a stylized retro scale in the FM broadcast range;
- increased the degree of averaging of the S-meter;
- changed the frequency correction mechanism - now it should be more accurate and does   not depend on the frequency at which the calibration is done;
- detected and fixed error of switching DFT 120-150 MHz;
- renamed the state of the parameters: "Enable" to "Enabled", "Disable" to "Disabled";
- fixed a bug when working with a step of 8.33 kHz;
- fixed error with receiver stuck at low supply voltage;
- added selection of clock frequency depending on the processor revision:
  revision Y operates at 465MHz, revision V - at 480MHz;
- reduced interference from the touchscreen;
- changed the frequency of the PWM backlight for a more complete range of brightness   control;
- The error of saving settings in the Visual and Audio menus has been fixed - earlier   settings   might not be saved when they were changed;
- S-meter correction made when UHF is turned on - made the mode of enabling and   disabling the image of the panorama and waterfall - in the Visual menu the parameter "View Pan & Wtf. In this mode, the data in the display is only clamped when changing the   settings by the user. This reduces the level of interference.
- fixed a bug with step selection - the bug led to a frequency failure when
  choosing a step;
- added shutdown timer - in the HARD menu the Activity timer button;
- the switching mechanism is changed - one press at a time in three;
- in the Visual menu, the bug with the backlight of the "LCD Sleep" button has been fixed.
 
1.10a:
- changed the inscription on the splash screen;
- changed the inscription of the Vbat control option - Standart is replaced by Standard;
- at the request of the users, the sensitivity of the touchscreen returned -
  please do not complain about the possible interference, we were not supporters of this return :)
- changed the setting of the reverse encoders. This is now one option on the hard menu;
- added autosearch of stations for Retroscale in VHF FM;
- added the option step "<-NEXT->" on the Retroscale for transition by rotating the knob   from station to station (if available on the scale);
- added color selection (one of three) for Retroscale;
- added IQ swap option to the HARD menu - to solve problems with Chinese clones, in   which I and Q signals are mixed;
- on the main screen the AGC adjustment is replaced by ATT;
- added a DC suppression adjustment function to the VISUAL menu - this is a hump in the   center of the panorama.
 
1.10b:
- fixed error in the S-meter readings for frequencies above 30MHz;
- the panorama scale injection has been changed - now instead of x1, x2, x4,
  160kHz, 80kHz, 40kHz are shown;
- in SSB the 100kHz step is excluded and the 25Hz step is added;
- the touchscreen sensitivity is lowered again :);
- added synchronous AM detector;
- the frequency at which the low-pass filter 500000 is turned on is increased to 540,000, for   better suppression of signals above the frequency of 500 kHz;
- added Auto Notch filter to the Audio menu;
- stretched grunginess adjustment;
- added DSB mode - as a kind of SSB;
- added CW mode - as a kind of SSB;
 
1.10c:
- improved graphical display of the spectrum
- improved optimization of algorithms, increased display speed, especially in WFM mode
- added the ability to determine the type of inclusion - one or three clicks.
  If PD15 (pin 7 of the RESERVED field) is open, then turn on by one press; if this pin is        shorted to a common wire, then turn on by three clicks
- the HARD menu has been improved
- changed battery indication - voltage is indicated over the picture
- added the ability to control user equipment using a discrete signal - PD14 (pin 8 of the RESERVED field)
- added a button for switching audio output in the HARD menu. It duplicates the audio output switch. Made by user request.
- added modes SAM-U and SAM-L
- added engineering settings to the HARD menu
- added automatic Notch filter in AM mode
- added saving of retro scale type
- changed the management of high-frequency filters at the input of the receiver
- fixed error during frequency tuning
- fixed bugs in automatic station search in FM mode
- added Pseudo Stereo function
- added "CCIR / JAPAN" Retroscale band selector to AUDIO menu
- respectively, added Retroscale for the Japanese VHF FM band 76.1 MHz - 94.9
  MHz and 6 presets for different regions of Japan, agreed with Japanese users.
- Fixed a bug when canceling the autosearch mode for stations and when exiting the   autosearch without saving the found one (refusing to save the found). In previous versions,   in these cases, all stations that were on the scale before the start of the autosearch were   erased and the scale became empty. Now, in these cases, the original scale is restored.
- the design of the regular end of autosearch has been changed, a table-grid of frequencies   for found stations has been added, messages about the absence or the number of stations   found have been added.
- autosearch is no longer dependent on the inclusion of the stereo mode and the state of the   activated outputs to the speaker and headphones, it works in any combination of states,   after the end of the search, the original state of the stereo mode is restored.
- in some places of the editing menu, the retroscales of the CANCEL key names are   changed to EXIT, as they are closer in the meaning of the action being performed.
- Added a limitation on the number of stations on Retroskale - 69 for the CCIR band and 63   for JAPAN - as the maximum number with an interval between neighboring stations from   300 kHz and above.
- fixed minor bugs of previous versions related to preserving the color of the scales and   saving the step type (50 kHz / NEXT) for each scale.
- reduced the speed of switching stations in the NEXT step mode.
- the operation of the synchronous AM detector has been fixed (07/26/2021)
 
1.10d(assume the last release for DSP1)
- fixed the error indicating the firmware version. The version is now indicated on the splash   screen in the lower right corner
- added display noise reduction function to HARD menu
- WTF replaced with WF
- changed encoder control - now, being in the menu, the frequency encoder is used for   control
- added 9kHz step in SSB
- added the ability to select colors in the Visual menu
- excluded Sleeptime parameter for backlight control
- no delay when switching between menus
- small bugs fixed
- lower receiving frequency reduced to 10 kHz

2020年10月20日 星期二

CJMCU-3212 BADUSB board introduction and resource

In order to do the virtual keyboard study, I bought a CJMCU-3212(also called WiFi-Ducky) from Taobao(not yet reach me this moment). As I knew, it is an evaluation board to integrate ATMEGA32U4(Arduino), ESP8266(WiFi) and SD card reader. The well-known BADUSB board is Rubber Ducky USB from HAK5 and it is well documented and easy to find a lot of resources from Web page, Github and Youtube. For CJMCU-3212, no official document and website to mention and support it. I can only collect some information from Chinese website and see some videos from Youtube or Youtube-like site. Here are the information I organized and translated to English for people who interested about it.

Hardware(it integrate three modules)

a. Main module, ATMEGA32U4 to be identified as Arduino Leonardo

b. WiFi module, ESP8266-ESP-12E, to communicate with the system with WiFi

c. SD card module, to read the script inside the SD card for execution

The WiFi module provide an interactive method to input the script and the SD card can store the script for execution instead of the EEPROM of ATMEGA32U4


Pinout(to be updated)


Software

It borrows many codes from Rubber Ducky USB project

a. USB-Rubber-Ducky, for main module

b. wifi_ducky, for WiFi module

c. Duckduino-microSD, for SD card reader

*the default COM setting for ATMEGA32U4 Leonardo 9600N81

*the SD card need to be format as FAT32 and the start-up script name is "script.txt"

*the default WiFi hotspot is called "WiFi Duck" and the default password to access is "quackquack" and the default IP is "192.168.4.1"

*the flasher program for ESP8266 "ESP8266 Flasher_x64", the ROM file for WiFi "esp8266_wifi_duck_4mb.bin”, baudrate setting "115200"






Usage(to be continued... when I got the module)


Reference

https://www.lemonsys.cn/tech_110/

https://www.bilibili.com/read/cv5472965

https://hackaday.com/2014/10/05/badusb-means-were-all-screwed/

https://www.youtube.com/watch?v=G-Z2rf_AN-c

2019年2月28日 星期四

SDR and GNURadio Course Outline 

Hardware

1. What is Radio ? What is Software Defined Radio ?
2. Generalize SDR Architecture
3. The well known SDR platforms
    RTL-SDR, plutoSDR, SDRDuo, HackRF, AirSpy HF+, FunCube Dongle Pro+, KX3, IC7610,     
    Perseus, USRP B205mini, SunSDR2, Flex6500
4. Remote Operation
    WebSDR, OpenWebRX

Software

0. Most used SDR software SDR#, HDSDR, SDR-Console, SDRuno, Linrad, gqrx, GNURadio
1. What is GNURadio  ? What inside of the GNURadio ? What is its capability and Why is it required ?
2. GNU Radio Live SDR Environment (Run without installation)
3. GNURadio installation – Linux and Windows environment
4. GNURadio experiment – examples and practice (basic blocks function and AM/FM radio)
5. Advanced techniques – Out Of Tree (https://wiki.gnuradio.org/index.php/OutOfTreeModules)
6. Q&A and supplements (GRCon and FOSDEM meeting agenda)

FUNcube Dongle Pro+ Block Diagram



HackRF One Block Diagram



SDR Comparison Table


SDR Comparison Table in searchable format
Presentation material: 01_sdr and gnuradio_wjlee20190228_2in1.pdf
(hardware related sheets in black background, software related sheets in blue background and the information related sheets in green background)

GNU Radio Practice          

0. GNURadio Installation
a. Linux Installation
From scratch
Install Dependencies(Ubuntu 18.04 LTS or Mint Tara)
sudo apt-get -y install git cmake g++ python-dev swig  \
pkg-config libfftw3-dev libboost-all-dev libcppunit-dev libgsl-dev \
libusb-dev libsdl1.2-dev python-wxgtk3.0 python-numpy python-cheetah \
python-lxml doxygen libxi-dev python-sip libqt4-opengl-dev libqwt-dev \
libfontconfig1-dev libxrender-dev python-sip python-sip-dev python-qt4 \
python-sphinx libusb-1.0-0-dev libcomedi-dev libzmq3-dev python-mako \
python-gtk2
Installing GNU Radio
git clone --recursive http://git.gnuradio.org/git/gnuradio.git
cd gnuradio; mkdir build; cd build; cmake ../; make; sudo make install
https://wiki.gnuradio.org/index.php/UbuntuInstall

From repository
sudo apt-get install gnuradio

b. Load Gnuradio Live ISO with Virtual machine
     https://www.vmware.com/tw/products/workstation-player/workstation-player-evaluation.html
     https://wiki.gnuradio.org/index.php/GNU_Radio_Live_SDR_Environment

    

c. Burn Gnuradio Live ISO to USB thumb drive or DVDD
    Unetbootin location https://unetbootin.github.io/
    

d. Install GNURadio in Windows
     http://www.gcndevelopment.com/gnuradio/downloads.htm
      run “*\GNURadio-3.7\bin\volk-profile.exe” to optimization computer performance after the installation
      start GnuRadio Companion(GRC)

1. My first project – Function Generator



Used blocks: Options, Variable, Signal Source, Noise Source, Add, Multiple Const, Audio Sink, QT GUI Range, QT GUI Chooser, QT GUI Sink
GRC file: function generator

2. DTMF Tone Generator


Used blocks: Options, Variable, Signal Source, Selector, Add, Multiple Const, Audio Sink, QT GUI Chooser, Throttle, QT GUI Sink, QT GUI Time Sink, Null Source, Null Sink
GRC file: DTMF Tone Generator

3. X-Y Plot


Used Blocks: Option, Variable, Signal Source, QT GUI Range, Float to Complex, Throttle, QT GUI Sink
GRC file: X-Y plot with QT GUI

4. Tunable Bandpass Filter


Used blocks: Options, Variable, Noise Source, Throttle, Band-Pass Filter Taps, Band Pass Filter, FFT Filter, QT GUI Range, QT GUI Sink
GRC file: Tunable Band Pass Filter

5. AM Demod – From USRP recorded signal



Used blocks: Options, Variable, File Source, Signal Source, Add, Multiply, Multiply Const, Rational Resampler, Complex To Mag, DC Blocker, Low Pass Filter, QT GUI Range, QT GUI Time Sink, QT GUI Sink, Audio Sink
USRP recorded file: am_usrp710.dat (Dr. Katz course project)

6. AM/DSB-SC/USB/LSB Modulation

Used blocks: Options, Variable, Noise Source, Signal Source, Add Const, Multiply, Selector, Low Pass Filter, Band Pass Filter, QT GUI Chooser, QT GUI Time Sink, QT GUI Sink

7. RTL-SDR FM tuner

    RTL-SDR driver installation for GNU Radio(Zadig)    






Used blocks: Options, Variable, RTL-SDR Source, Multiply Const, Low Pass Filter, WBFM Receiver, Rational Resampler, QT GUI Range, QT GUI Time Sink, Audio Sink, QT GUI Sink, QT GUI Waterfall Sink
GRC file: RTL-SDR FM Tuner

Gnuradio experiments collection: gnuradio experiments.zip
Presentation material for the experiment: 02_gnuradio experiments_wjlee20190228_2in1.pdf
Where to find more useful information: 03_grcon and fosdem_20190228_2in1.pdf

2018年4月6日 星期五

Black Pill(STM32F103C8T6) to work with Arduino

The Black Pill is a STM32F103C8T6 based controller board with 64K Flash, 20K SRAM, 2x 12-bit ADC, 2x SPI, 2x I2C, 2x USART, 1x USB and 5V-tolerant I/O. It cost 2 to 3 USD from Ebay or Taobao. As its name, Black Pill's PCB color is black and there are different variant called Blue Pill, and Red Pill. From the schematic, you can see the indication LED is connected to PB12. When PB12 is assigned to "0", it will turn-on the LED.


To program the Black Pill, you can use the UART(bootloader) or ST-Link. In addition, you can also use the USB interface, but you need burn the USB bootloader to it in advance. The procedure to work Black Pill with Arduino IDE and USB interface is shown below

1. Burn USB Bootloader

a. Set the BOOT1/BOOT0 as 0/1
b. Prepare a USB-2-UART cable and connect PA9/RX, PA10/TX, +3.3V and ground
d. Start ST flasher loader and upload the firmware
** The setting and connection between Black Pill and USB-2-UART cable need assign properly, otherwise the flash loader program will not go the burn process. The connection and operation menu is displayed.



2. Arduino IDE to support the STM32

a. Get Arduino_STM32 from github and put it over
"C:\Users\<login username>\Documents\Arduino\hardware"
(my example C:\Users\vincentlee\Documents\Arduino\hardware\Arduino_STM32)
b. run "C:\Users\vincentlee\Documents\Arduino\hardware\Arduino_STM32\drivers\win\install_drivers.bat"
to install the driver or you will see error in Arduino upload.
c. Start the Arduino IDE to select and check the Black Pill is supported. The "Get Board Info" menu can show the board information

d. Load the "blink" example, edit the indication LED pin to "PB12" for Black Pill


e. Set the BOOT1/BOOT0=0/0 to boot for flash memory and connect the Black Pill thru USB

f. Compile and upload the Sketch to Black Pill
If the "blink" Sketch is uploaded properly, it will turn-on the LED for 3 sec and turn-off LED for 1 sec continuously.


 If the DFU driver is not installed in procedure 2/b, then the error message
"Couldn't find the DFU device:[1EAF:0003]" is displayed and the upload process failed.

Q&A

1. STM32F103C8T6 part number naming rule
STM = the vendor, STMicroelectronics
32 = 32-bit, i.e. ARM series
F103 = model, “F1” also indicates that this is an ARM Cortex M3
C = 48-pins
8 = flash memory size is 64 KB(B series with 128KB flash and it seems share the same dice as 8 series)
T = package type is LQFP
6 = temperature range -40 to +85 °C

2. BOOT1/BOOT0 selection
From ST's datasheet, it worked as
Boot mode selection pins Boot mode Aliasing Note
BOOT1 BOOT0
x 0 Main Flash memory Main Flash memory is selected as boot space USB bootloader burned to work with Arduino IDE
0 1 System memory System memory is
selected as boot space
USART bootloader
1 1 Embedded SRAM Embedded SRAM is
selected as boot space
SRAM boot for debug

3. The board's COM port is not shown in programming
Sometimes, the used-to-work Black Pill is not function properly to show the COM port anymore. You can try to reset the board or load again the DFU driver again as procedure 2/b

4. reference link
a. Roger Clark's github
    https://github.com/rogerclarkmelbourne
b. stm32duino wiki
    http://wiki.stm32duino.com/index.php?title=Black_Pill
    http://wiki.stm32duino.com/index.php?title=Blue_Pill
    http://wiki.stm32duino.com/index.php?title=Maple_Mini
    http://wiki.stm32duino.com/index.php?title=Red_Pill

2017年7月23日 星期日

Digilent Analog Discovery Kit

Digilent Analog Discovery Kit(ADK in short) is an integrated instrument including
a. 2 channels oscilloscope
b. 16 channels logic analyzer
c. 2 channel arbitrary waveform generator(AWG)
d. 16 channels pattern generator
e. +/- 5V, 50mA power supply


2. TRM - pcb, IC list - overkill for provided components
Top side of the ADK PCB

Bottom side of the ADK PCB
3. software feature - FFT, SA, AWG, PG
4. personal application - BERT, long record pattern generator,

10-bit digital sinewave generation
Matlab code
==========
% pattern file generation for Digilent Analog Discovery Kit
% 2013/01 wjlee
clear;
close all;
%the file format for Waveforms's pattern generator
%line1(header): Bus 1,[9] MSB,[8],[7],[6],[5],[4],[3],[2],[1],[0] LSB
%line2: b0000000000,0,0,0,0,0,0,0,0,0,0
%line3: b0000000001,0,0,0,0,0,0,0,0,0,1
%line1025: b1111111111,1,1,1,1,1,1,1,1,1,1
reclen=1000; %the patgen record length(max=1024)
adcbit=10;   %ADC resolution
dacbit=10;   %DAC resolution
theta=0:2*pi/reclen:2*pi*(1-1/reclen);
adcfull=2^adcbit-1;
dacfull=2^dacbit-1;
amp=round(dacfull*(sin(theta)+1)/2);
plot(amp);
hold on;
grid on;
plot(amp,'r.');
axis([1 reclen 0 dacfull]);


%write data to file
disp('     ');
disp('Generate the "pgenw.csv" for Digilent Analog Discovery Kit Pattern Generator');
disp('     ');
%pgenw='pgenw.csv';
%fid1=fopen(pgenw,'w');
fid1=fopen('pgenw.csv','w');
if dacbit==10
   fprintf(fid1,'Bus 1,[9] MSB,[8],[7],[6],[5],[4],[3],[2],[1],[0] LSB \n','  ');
   ampbin=dec2bin(amp,10);
   for i=1:reclen,
     fprintf(fid1,'b%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s \n',ampbin(i,:),ampbin(i,1),ampbin(i,2),ampbin(i,3),ampbin(i,4),ampbin(i,5),ampbin(i,6),ampbin(i,7),ampbin(i,8),ampbin(i,9),ampbin(i,10));
   end
end;
fclose(fid1);
%if dacbit==9 then
%   fprintf(fid1,'Bus 1,[8] MSB,[7],[6],[5],[4],[3],[2],[1],[0] LSB \n','  ');
%end;
%if dacbit==8 then
%   fprintf(fid1,'Bus 1,[7] MSB,[6],[5],[4],[3],[2],[1],[0] LSB \n','  ');
%end;
==========