Skip to content

Commit

Permalink
Disable periodic IPCC zero bytes on Grapefruit (#1988)
Browse files Browse the repository at this point in the history
In the current IPCC design, the SP sends zero bytes periodically when
the channel is idle to guard against the possibility of losing a frame
terminator. On gimlet this causes the UART FIFO to quickly fill up and
so when the channel wakes up there are around 16 bytes to drain and
things move along. On grapefruit/cosmo, however, there is a 4K FIFO in
the FPGA upstream of the SP here so the natural saturation doesn't (yet)
occur as we'd like. The extra zero bytes also make tracing the bus
harder. Disable them for now.
  • Loading branch information
citrus-it authored Jan 22, 2025
1 parent 8a26380 commit 8d3e383
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/gimletlet/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ task-slots = ["jefe"]

[tasks.host_sp_comms]
name = "task-host-sp-comms"
features = ["stm32h753", "uart7", "baud_rate_3M", "hardware_flow_control", "vlan"]
features = ["gimlet", "stm32h753", "uart7", "baud_rate_3M", "hardware_flow_control", "vlan"]
uses = ["uart7", "dbgmcu"]
interrupts = {"uart7.irq" = "usart-irq"}
priority = 8
Expand Down
6 changes: 6 additions & 0 deletions task/host-sp-comms/src/tx_buf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,16 @@ impl TxBuf {
}

/// Should we be sending periodic 0 bytes?
#[cfg(feature = "gimlet")]
pub(crate) fn should_send_periodic_zero_bytes(&self) -> bool {
matches!(self.state, State::Idle)
}

#[cfg(feature = "grapefruit")]
pub(crate) fn should_send_periodic_zero_bytes(&self) -> bool {
false
}

/// Encodes `reason` into our outgoing buffer.
///
/// # Panics
Expand Down

0 comments on commit 8d3e383

Please sign in to comment.