Re:ACE: Apple Type-C Port Controller Secrets
by xxpor on Wednesday December 30, 2020 @02:08PM
(#25584855)
I know next to nothing about microcontrollers, so this might be a dumb question, but how do they do the initial flashing is they can't run a serial port? Are they hooked up to something external before going on the final PCB? Do they not need a precise clock to read the onboard program from whatever's storing it?
Re:ACE: Apple Type-C Port Controller Secrets
by michaelt on Wednesday December 30, 2020 @02:50PM
(#25585266)
Even if you've got a really inaccurate clock, you can still accept synchronous protocols like SPI and I2C where the bus master provides a clock signal.
Every chip brand would have their own protocol and provide their own programming hardware that could speak it.
Not only do you save the costs of using a crystal, you also save two pins - which was useful in the days of 8-pin microcontrollers like the ATtiny85.
As internal RC oscillator drift rates can be as much as 10% (and vary with temperature) they're not precise enough to run a serial connection, let alone a USB connection. That's why products like Arduino tend to go directly to using a proper crystal (which gives you a 0.01% drift rate for a few pennies).