Comments (9)
Yep, used extensively on a PyBoard (STM32F405) with USB VCP. Also used on an RP2040 Raspberry Pi Pico with USB. Check out this video:
Source code for the MicroPython firmware changes:
https://github.com/kentindell/canhack/tree/master/pico/micropython
from min.
The monitor framework has been used to build the CANPicoCtrl GUI: the host is all in Python, talking to the Pico, with its monitor in Python.
https://kentindell.github.io/2022/05/11/canpicoctrl/
The monitor software for host and target is included in the branch mincan
in this repo:
https://github.com/min-protocol/min/tree/mincan
I'll merge this and tidy everything up when I've got the Linux implementation super robust (right now the pyserial hangs on close() if there's a write timeout, so I'm changing the discovery of a monitor to a ping, with a timeout). The framework should be very useful for anyone wanting to do command/response from a host app.
from min.
Oh, how nice of you! Thanks!
from min.
Yep, used extensively on a PyBoard (STM32F405) with USB VCP.
Are there any public repositories with this?
from min.
No, but it's obsolete compared to the Pico implementation using TinyUSB.
from min.
I have to manage STM32F103C8T6 using STM32CubeIDE.
from min.
Take a look at how MIN is stitched in to the MicroPython Pico framework: it doesn't touch anything but the callbacks, and if your IDE has USB support it should be straightforward to glue it together in a similar way.
from min.
I'm overwhelmed, actually :(
usbd_cdc_if.c
suggests its own set of callbacks and nothing else whatever, which I have no idea how to marry with half the MIN callbacks.
from min.
If you look in rp2_min.c you'll see a couple of static functions: usb_write and usb_read. These push bytes to/from USB. In the Pico case, it uses the TinyUSB library that's instantiated by MicroPython (the Pico SDK has TinyUSB support too, and I guess the STM32 SDK also does, so it will look similar).
The MIN callbacks are also in there: min_tx_space just says "yeah, 1K free", min_tx_byte pushes a byte into a local buffer, min_tx_start clears the local buffer, and min_tx_finished pushes the local buffer into TinyUSB (via the local push function).
The function min_poll is called from the Python recv() code, which pulls the bytes from the USB drivers, which is how MIN is driven.
The interesting callback is min_application_handler, which in this case creates a bunch of Python objects on the heap to pass into Python-world. But that's where your application code would go to handle incoming MIN frames.
MIN is entirely polled, so no interrupts. And the TinyUSB interface is polled too (there are interrupts in the background that feed the USB API but I don't go anywhere near those and let MicroPython deal with it all).
from min.
Related Issues (20)
- AvailableForWrite Limit HOT 1
- VS 2015 min_debug_print(args...) + Suggestions ? HOT 11
- Question about sequence numbers HOT 5
- min_poll starts handling transports even frame is not ready
- Some fixes...
- MIN protocol not working properly on TI MCUs but works on STM HOT 2
- Escape 0x03 (CTRL-C)
- Question regarding the signal layer json HOT 2
- Question: Is Data-Streaming Supported? HOT 2
- Ability to calculate CRC in HW HOT 1
- Time-based frame-delimiting HOT 4
- A Rust library for MIN. HOT 1
- Any port for C#? HOT 2
- Review Comments
- Received spurious ACK HOT 2
- Testing MIN with serial monitor HOT 2
- How to include in C++ project? HOT 1
- Possible bug in the code
- Multiple Ports HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from min.