4 ms·
Okay, I don't have a mac. But the discussion of Apple's design for the trackpad and keyboard is fascinating. Running the touchpad and keyboard through an emb
by schaefer 4y ago
Okay,
I don't have a mac. But the discussion of Apple's design for the trackpad and keyboard is fascinating. Running the touchpad and keyboard through an embedded M3 microcontroller that's wired to the rest of the system over the SPI bus rather than USB for both lower latency and higher power efficiency.
- p_l 4y agoIt's somewhat common approach (I think USB was only done in Macs, in fact). HID over I2C/SPI is somewhat common solution, taking over from PS/2, and of course you need an MCU for the matrix scanner and the touchpad anyway.
- pantalaimon 4y agoI'm a bit surprised they have two MCUs though (BCM5976 and STM32)
- p_l 4y agothe BCM5976 is dedicated touchscreen ASIC that Broadcom makes for Apple for their iPhone and iPad devices, there's probably MCU (or four, this is broadcom we're talking about) inside, but that's probably because it's simpler to implement this way.
- magicalhippo 4y agoReminded me of the Raspberry Pi Pico W[1], where they paired a dual-core ARM Cortex M0+ MCU with a wifi chip that has both a Cortex M3 core and a Cortex M4 core[2]. The Arduino Unos being paired with an ESP-01 module is similar. Tons of other examples out there as well of course. Not sure if there's a similar "power inversion" at play here, just find it funny when it shows up. [1]: https://www.raspberrypi.com/news/raspberry-pi-pico-w-your-6-iot-platform/ https://www.raspberrypi.com/news/raspberry-pi-pico-w-your-6-... [2]: https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/cyw43439/ https://www.infineon.com/cms/en/product/wireless-connectivit... (see block diagram)
- Vogtinator 4y agoYep, all laptops I have used (Samsung, Lenovo, Dell, HP) have their touchpad connected over I²C.
- foxhill 4y agothis is one thing i can’t stand with macs anymore - they have enormous input latency. if SPI results in lower power usage, then great. USB can easily manage single digit millis, and i’d estimate 4 or 5 (?!) frames of composition and/or vsync latency. insane. it means my 2019 macbook pro has ~80ms input latency - absolutely noticeable but not the worst thing in the world - the m1 and m2 machines are actually worse somehow. the higher refresh rate displays help (back down ~50ms) but HFR is a crutch. i really wish apple would get on top of that. i think peripheral interconnect is a moot point :)
- CarVac 4y agoI wonder why this is true when their iOS touchscreens are very responsive.
- pantalaimon 4y agoI don't see how SPI would introduce latency, quite the opposite. SPI is a super simple bus, you write bytes and get bytes in return - do that in response to an interrupt generated via a separate interrupt line and you can't get any less latency than that.
- foxhill 4y agoah, i didn't mean to suggest that SPI is adding additional latency (i'd have bet the opposite), i'm pretty confident it's everywhere else in the stack causing it.
- monocasa 4y agoI doubt the choice of SPI is related to input latency issues.
- foxhill 4y agoi was trying to say that switching to SPI to reduce latency would be redundant, given that the rest of the stack seemingly adds so much..!