Skip to content

Fix technical inaccuracies in protocol data rates, type casts, and component descriptions#224

Merged
sahil-kale merged 2 commits into
mainfrom
copilot/audit-technical-inaccuracies
Dec 5, 2025
Merged

Fix technical inaccuracies in protocol data rates, type casts, and component descriptions#224
sahil-kale merged 2 commits into
mainfrom
copilot/audit-technical-inaccuracies

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 28, 2025

Audit of book content identified several technical inaccuracies that could mislead readers.

Protocol Data Rates (signalling.tex)

  • Fixed I2C expansion: "Inter-Interconnected Controller" → "Inter-Integrated Circuit"
  • Fixed UART units: 115.2 kHz → 115.2 kbps (bit rates, not frequency)
  • Standardized capitalization: mbps → Mbps

Code Example Type Mismatch (keyword.tex)

// Before: type mismatch in cast
volatile const uint8_t* const REG = (uint32_t*)0x12345678;

// After: consistent types
volatile const uint8_t* const REG = (uint8_t*)0x12345678;

Oscilloscope Probe Description (oscilloscope.tex)

  • Corrected: 10x probe attenuates (divides) voltage by 10, not "scales" by 10

Semaphore Semantics (mutex_vs_semaphore.tex)

  • Fixed wait operation: blocks when count == 0, not "less than zero" (counting semaphores are non-negative)

LDO Pass Element (buck_vs_ldo.tex)

  • Corrected transistor type: "PMOS FET or NPN BJT" → "PMOS FET or PNP BJT" (PNP provides lower dropout)
Original prompt

This section details on the original issue you should resolve

<issue_title>Audit and review the book for any technical inaccuracies</issue_title>
<issue_description>Look through the book source and find any technical inaccuracies. Suggest changes to improve the correctness of such inaccuracies. Goal is to make sure that no incorrect knowledge is distributed by means of the book</issue_description>

<agent_instructions>Crosscheck all technical assertions with online sources where applicable</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…x/semaphore, and buck/LDO sections

Co-authored-by: sahil-kale <32375512+sahil-kale@users.noreply.github.com>
Copilot AI changed the title [WIP] Audit and review the book for technical inaccuracies Fix technical inaccuracies in protocol data rates, type casts, and component descriptions Nov 28, 2025
Copilot AI requested a review from sahil-kale November 28, 2025 02:55
Comment thread src/buck_vs_ldo.tex

\subsubsection{Losses}
In an LDO, the pass element transistor (usually implemented as a PMOS FET or NPN BJT) acting similarly to a variable resistor is actively controlled to maintain a fixed output voltage, regardless of changes to input voltage, load current, and temperature. This variable resistance gives rise to \textit{conduction losses} within this type of regulator. Assuming a fixed input voltage and load current, the power losses in an LDO can be calculated as $P = V_{drop} \cdot I_{out} = (V_{in} - V_{out}) \cdot I_{out}$. Note that the power is dissipated as heat in the pass element - this is why LDOs are often equipped with a heat sink, and attention may be required to the thermal limitations of the chosen LDO. \newline
In an LDO, the pass element transistor (commonly implemented as a PMOS FET or PNP BJT for low dropout performance) acting similarly to a variable resistor is actively controlled to maintain a fixed output voltage, regardless of changes to input voltage, load current, and temperature. This variable resistance gives rise to \textit{conduction losses} within this type of regulator. Assuming a fixed input voltage and load current, the power losses in an LDO can be calculated as $P = V_{drop} \cdot I_{out} = (V_{in} - V_{out}) \cdot I_{out}$. Note that the power is dissipated as heat in the pass element - this is why LDOs are often equipped with a heat sink, and attention may be required to the thermal limitations of the chosen LDO. \newline
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielJPuratich is this legit?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow yea copilot is good. might be worth dropping the mention of BJTs at all or even this parenthesized comment entirely, seems like modern LDOs are entirely PMOS FETs? Googling around.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aight imma yolo merge this for now

Comment thread src/keyword.tex
#include <stdint.h>

volatile const uint8_t* const UART_RECEIVE_REGISTER_READ_ONLY = (uint32_t*)0x12345678;
volatile const uint8_t* const UART_RECEIVE_REGISTER_READ_ONLY = (uint8_t*)0x12345678;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how tf did my very strict compiler warnings not ding this :/

@sahil-kale sahil-kale marked this pull request as ready for review December 5, 2025 00:35
Copilot AI review requested due to automatic review settings December 5, 2025 00:35
@sahil-kale sahil-kale merged commit 262395c into main Dec 5, 2025
2 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects several technical inaccuracies across documentation files, addressing protocol specifications, type safety, and component descriptions. While most corrections are accurate, there are critical issues with the I2C and SPI data rate unit changes that introduce new inaccuracies.

Key changes:

  • Corrected I2C expansion, UART bit rates, and CAN capitalization in protocol table
  • Fixed type cast mismatch in const keyword example
  • Improved oscilloscope probe and semaphore operation descriptions
  • Corrected LDO transistor type from NPN to PNP

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/signalling.tex Fixes I2C name expansion, UART units (kHz→kbps), and CAN capitalization; however, incorrectly changes I2C/SPI from Hz to bps
src/keyword.tex Corrects type cast from uint32_t* to uint8_t* to match pointer type
src/oscilloscope.tex Improves accuracy by changing "scales" to "attenuates" and clarifying voltage division
src/mutex_vs_semaphore.tex Corrects semaphore wait operation description for non-negative count semantics
src/buck_vs_ldo.tex Fixes LDO pass element transistor type from NPN to PNP BJT

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/signalling.tex
& CAN & Controller Area Network & Differential Pair & Bus & Half-Duplex & Open Drain & Asynchronous & 1 mbps & 8 mbps \\ \hline
& UART & Universal Asynchronous Receiver Transmitter & Single Ended & Point to Point & Full-Duplex & Push Pull & Asynchronous & 115.2 kbps & 921.6 kbps \\ \hline
& I2C & Inter-Integrated Circuit & Single Ended & Bus & Half-Duplex & Open Drain & Synchronous & 400 kbps & 1 Mbps \\ \hline
& SPI & Serial Peripheral Interface & Single Ended & Bus & Full-Duplex & Push Pull & Synchronous & 24 Mbps & 60 Mbps \\ \hline
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SPI data rates should be expressed in Hz (clock frequency), not bps (bit rate). SPI is a synchronous protocol that uses a clock signal (SCK/SCLK), and its speed is specified by the clock frequency.

Change "24 Mbps" to "24 MHz" and "60 Mbps" to "60 MHz".

Suggested change
& SPI & Serial Peripheral Interface & Single Ended & Bus & Full-Duplex & Push Pull & Synchronous & 24 Mbps & 60 Mbps \\ \hline
& SPI & Serial Peripheral Interface & Single Ended & Bus & Full-Duplex & Push Pull & Synchronous & 24 MHz & 60 MHz \\ \hline

Copilot uses AI. Check for mistakes.
Comment thread src/signalling.tex
& SPI & Serial Peripheral Interface & Single Ended & Bus & Full-Duplex & Push Pull & Synchronous & 24 MHz & 60 MHz \\ \hline
& CAN & Controller Area Network & Differential Pair & Bus & Half-Duplex & Open Drain & Asynchronous & 1 mbps & 8 mbps \\ \hline
& UART & Universal Asynchronous Receiver Transmitter & Single Ended & Point to Point & Full-Duplex & Push Pull & Asynchronous & 115.2 kbps & 921.6 kbps \\ \hline
& I2C & Inter-Integrated Circuit & Single Ended & Bus & Half-Duplex & Open Drain & Synchronous & 400 kbps & 1 Mbps \\ \hline
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I2C data rates should be expressed in Hz (clock frequency), not bps (bit rate). I2C is a synchronous protocol that uses a clock signal (SCL), and its speed is specified by the clock frequency.

The correct values should be:

  • Typical: 400 kHz (Fast mode)
  • Maximum: 1 MHz (Fast mode plus)

Change "400 kbps" back to "400 kHz" and "1 Mbps" to "1 MHz".

Suggested change
& I2C & Inter-Integrated Circuit & Single Ended & Bus & Half-Duplex & Open Drain & Synchronous & 400 kbps & 1 Mbps \\ \hline
& I2C & Inter-Integrated Circuit & Single Ended & Bus & Half-Duplex & Open Drain & Synchronous & 400 kHz & 1 MHz \\ \hline

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit and review the book for any technical inaccuracies

4 participants