Exchanging Data With the C0-microSD+
Your host application and your device application exchange data through the two halves of the 64 KiB MMIO buffer, and everything else builds on that.
- Inputs travel from the host into the 32 KiB input half, which the device
application reads as
kC0HALInputBufferFloat,kC0HALInputBufferUint32, and the other typed views of the same memory. - Results travel from the 32 KiB output half, which the device application writes
as
kC0HALOutputBufferFloatand friends, back to the host. - The host drives each exchange with
write_input_buffer(),calculate_command(), andread_output_buffer()from the Python host interface.
The host also controls the core. Bring the core up before the first round trip, for
example with reset_core(), and stop it before flashing a new binary. Stopping the core
matters most for an xip build, which runs directly from the flash that the toolkit is
about to erase. See
Control the Core
and
SPI Flash Write and Erase Semantics.
The Cookbook collects the recipes that put these buffers to work, and each applies to the C0-microSD+ as written.
- Sending Inputs to the Module, floats as distribution parameters, measured samples, whole distributions as Ux Binary Data, and integers as configuration.
- Returning Results to the Host, particle values, on-module statistics, sample batches, and full distributions.
- Using the Results on the Host,
printing Ux Strings and plotting distributions with the
signaloidpackage. - Debugging and Logging, reading the device log inside your host application.
For the layers underneath the recipes, see Using the Hardware Abstraction Layer for the device side, Using the Python Host Interface for the host side, and Host Interface and Protocol for the registers and offsets underneath both.