Skip to content

Commit 8d3e383

Browse files
authored
Disable periodic IPCC zero bytes on Grapefruit (#1988)
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.
1 parent 8a26380 commit 8d3e383

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/gimletlet/app.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ task-slots = ["jefe"]
103103

104104
[tasks.host_sp_comms]
105105
name = "task-host-sp-comms"
106-
features = ["stm32h753", "uart7", "baud_rate_3M", "hardware_flow_control", "vlan"]
106+
features = ["gimlet", "stm32h753", "uart7", "baud_rate_3M", "hardware_flow_control", "vlan"]
107107
uses = ["uart7", "dbgmcu"]
108108
interrupts = {"uart7.irq" = "usart-irq"}
109109
priority = 8

task/host-sp-comms/src/tx_buf.rs

+6
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,16 @@ impl TxBuf {
139139
}
140140

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

147+
#[cfg(feature = "grapefruit")]
148+
pub(crate) fn should_send_periodic_zero_bytes(&self) -> bool {
149+
false
150+
}
151+
146152
/// Encodes `reason` into our outgoing buffer.
147153
///
148154
/// # Panics

0 commit comments

Comments
 (0)