| Deutsch English Français Italiano |
|
<vi2npg$308ip$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Don Y <blockedofcourse@foo.invalid> Newsgroups: comp.arch.embedded Subject: Re: AM623 experiences Date: Mon, 25 Nov 2024 13:47:41 -0700 Organization: A noiseless patient Spider Lines: 65 Message-ID: <vi2npg$308ip$1@dont-email.me> References: <vhs301$1klnt$1@dont-email.me> <vhshv0$1mhug$2@dont-email.me> <vhtc3u$1jk$1@reader2.panix.com> <vhuve1$26ho9$1@dont-email.me> <vhvmpa$p98$1@reader2.panix.com> <vi1d0s$2mn1p$1@dont-email.me> <vi24gb$cvb$1@reader2.panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 25 Nov 2024 21:47:47 +0100 (CET) Injection-Info: dont-email.me; posting-host="ca74200bab2553072e9304b47dac5fea"; logging-data="3154521"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JuNBVvgcB2WfCQ0KnNUob" User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cancel-Lock: sha1:GivsbiQggraHmdGMhGt12qra4BY= Content-Language: en-US In-Reply-To: <vi24gb$cvb$1@reader2.panix.com> Bytes: 4522 On 11/25/2024 8:18 AM, Grant Edwards wrote: > On 2024-11-25, David Brown <david.brown@hesbynett.no> wrote: > >> I think the clearest "war story" I have seen of that kind was for a >> tiny 8-bit device from Freescale. The chip had perhaps 2K of flash. >> Since this was a one-off use of the chip and I didn't want to read >> more manuals than I needed to, I use the vendor IDE "wizard" to make >> the initialisation code and a "driver" for the ADC. The resulting >> code was about 3.5 KB - for the 2 KB microcontroller. So I read the >> manual and found that the ADC peripheral needed one single bit set >> to make it run as I needed. > > One of the problems that the SDK authors have to try to deal with is > that the peripherals have gotten "too" versatile. They've got a > polled mode, an interrupt driven mode, a DMA mode, a burst mode, a > batch mode, a right-side up mode, an updisde-down mode, and three > compatibility modes so they'll work like products from 40 years ago. > > The SDK "drivers" always try to support all the modes in all possible > combinations and sometimes even allow you to switch back and forth > while the thing is running. They'll have open() and close() methods > for no apparent reason for devices that don't need to be opened or > closed. > > As a result, you end up with 3.5KB of driver for an ADC. To be fair, they often have to include the initialization/configuration code that a "real" system would have put elsewhere, hiding the true size of the code required to use the peripheral. > Then, in the real world. 99.99% of applicatoins only use one very > sepecific mode. You either read the hardware description and write > code from scratch (though the #defines for register offsets are > useful), or you pick your way through the "driver" code for you > particular set of modes/choices to find the handful of lines of code > that you need. > > Rather than providing a full-up "driver" I would find it a _lot_ more > useful if they just provided documented code snippets to perform some > of the basic operations that one needs to perform. Yes. Though the SDK has value if only for SUGGESTING names for the various symbolic constants needed to configure the device. The AM62x family reference manual is 16000 pages -- 12000 of those are "register descriptions (tabulated). That's a shitload of #defines to have to create from scratch! Given that the SDK had to come up with unique names for all of them, it's a headstart in designing your own naming convention for the device. [I'm going to bow out of this discussion as there is something clearly wrong with my server/attendant -- and fixing it is not a current priority. The fourth quarter is traditionally my "update equipment, applications, licenses" period along with the various birthdays, anniversaries and holidays that crowd into those three months. The NNTP server/attendant wasn't on the list for an upgrade as I *thought* it was working well (seems to be for other newsgroups and the phone attendant hasn't had any problems!) I'll see if I can rescue another box and rebuild it (silly not to take advantage of that need to also upgrade the hardware!)]