Manchester Code Proxy or MCP is an USB device with two USB endpoints:
- CDC - USB CDC communications device class can be used to emulate a serial port providing a virtualCOM port UART interface.
- MSC - USB MSC mass storage device class that makes a USB device accessible to a host computing device and enables file transfers between the host and the USB device.
On other side of proxy there is a single wire data interface. It uses a 3-state digital pin which works in bidirectional mode. The data is encoded using Manchester code. The following Manchester coding conventions are supported:
- IEEE802.3
- IEEE802.4
- G.E. Thomas
For current list of issues see ISSUES.md. For list of serial console commands refer to COMMANDS.md. For hardware connection refer to WIRING.md.
- STM32CubeIDE
- Development board STM32F411E-DISCO
- anyCS sensor
- Choose
File->Import... - In Import window select
General->Existing Projects into Workspace, clickNext - Choose
Select root directorythen click onBrowse...button - Navigate to downloaded project folder and click
Open - In
Projects:text box selectmcpproject - Make sure that Option
Copy projects into workspaceis checked, too - Click
Finish
After importing the project mcp should appear in Project Explorer window.
Right click on project name and execute the following options:
RefreshIndex->RebuildIndex->Freshen all files
These commands will rebuild Eclipse indexer which would make code highlighting and code browsing.
Right click on project name and execute Build project.
When the project building is done you should get something like the following:
Finished building target: mcp.elf
arm-none-eabi-objdump -h -S mcp.elf > "mcp.list"
arm-none-eabi-objcopy -O binary mcp.elf "mcp.bin"
arm-none-eabi-size mcp.elf
text data bss dec hex filename
22664 520 42368 65552 10010 mcp.elf
Finished building: default.size.stdout
Finished building: mcp.bin
Finished building: mcp.list
- In the menu click
Run->Debug configuration.... - In new window double click on
STM32 Cortex-M C/C++ Application. This will create a new item which has appeared just belowSTM32 Cortex-M C/C++ Applicationcalledmcp Debug. - Click on
Debugbutton. The ST-LINK LED should start blinking on the board. - Click
Run->Resumeto run the program.
When creating a new release go through the following steps:
- Edit the version string
APP_VERSION_STRINGin application configuration file:configuration/config_application.h. - Edit the timestamp string
APP_TIMESTAMP_STRINGin application configuration file:configuration/config_application.h. - Create commit and push
The application is currently configured during the compilation.
The application uses quarter of a bit period to generate the waveform. This
setting is specified in file mdrv.c in data structure called
g__default_config in structure membere quarter_period_us. The time is
specified in us.
This firmware uses High Speed External (HSE) oscillator clock as its main clock source. This clock is used to derive all peripheral clocks and software timeouts.
On the Discovery Kit board HSE oscillator is connected to X2 crystal. There is
no information available which part numbers are used (Bill of Materials is not
accessible on manufacturers site). The markings on the crystal are: 8.000s3Z.
Unfortunately, information on crystal marking is also not available.
The only fact that is known about used crystal is that must fulfill the USB 2.0 specification for clock accuracy. The USB 2.0 specification states that for full-speed communications, the data rate is specified to be 12 Mbps +/- 0.25%.
This means, that the used crystal has at least +/- 0.25% accuracy. As for stability of the clock, no information is available.