Fix technical inaccuracies in protocol data rates, type casts, and component descriptions#224
Conversation
…x/semaphore, and buck/LDO sections Co-authored-by: sahil-kale <32375512+sahil-kale@users.noreply.github.com>
|
|
||
| \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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
aight imma yolo merge this for now
| #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; |
There was a problem hiding this comment.
how tf did my very strict compiler warnings not ding this :/
There was a problem hiding this comment.
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.
| & 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 |
There was a problem hiding this comment.
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".
| & 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 |
| & 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 |
There was a problem hiding this comment.
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".
| & 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 |
Audit of book content identified several technical inaccuracies that could mislead readers.
Protocol Data Rates (signalling.tex)
Code Example Type Mismatch (keyword.tex)
Oscilloscope Probe Description (oscilloscope.tex)
Semaphore Semantics (mutex_vs_semaphore.tex)
LDO Pass Element (buck_vs_ldo.tex)
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.