Understanding on Terminologies - Page 1
Forum section: electronics / general

author: sadasivamASK
author_rank: Contributor
timestamp: April 29, 2022, 06:56:45 am
content: Hi,In Embedded Systems, need understanding on following topics.1. The term "Modules"?2. HAL3. Application Interface and Application Peripheral Interface4. Purpose of Drivers? without driver cant we access hardware directly?5. Inline Assembly coding- When it will be used better other than low level coding?6. What is Host in BLE

author: ataradov
author_rank: Super Contributor
timestamp: April 29, 2022, 07:35:06 am
content: This sounds like a homework assignment. We generally don't do people's homework.But also, have you tried googling at all? This is trivial stuff and answers are extremely easy to find.

author: sadasivamASK
author_rank: Contributor
timestamp: April 29, 2022, 07:40:31 am
content: Yeah, as it is. But, in terms of explaining with example. It will give some clarity on these topics.

author: ataradov
author_rank: Super Contributor
timestamp: April 29, 2022, 03:44:17 pm
content: Google first, describe how you understand those things and we will confirm or correct any inaccuracies. Nobody will be doing a homework for you or acting as your teacher.

author: tggzzz
author_rank: Super Contributor
timestamp: April 29, 2022, 06:00:05 pm
content: Quote from: sadasivamASK on April 29, 2022, 06:56:45 amThat can be achieved by:doing basic research, probably using googlethinking and understandingre-writing the relevant bitsin your own wordsthinking and understandingwhere your words lead you to believe you don't understand something, think and researchif you still don't understand, you will be in a good position to ask a question that can be answeredMaster that and you will have learned something that will be useful throughout your life in all sorts of ways.Yes, that requires hard work. That's life. Deal with it.

author: sadasivamASK
author_rank: Contributor
timestamp: June 01, 2022, 04:38:16 am
content: Hi,1. The term "Modules"?In terms of SW, Modules are discrete piece of code which can be independent created and maintained to be used in diff. systems. For example, developer may create a module containing a code required to use the soundcard or perform IO on certain type of File System. The module can then be used by any system that needs its functionality.In terms of HW, Modules is a independent component that is used as a part of complex systems. For eg, Memory module can connect to computer's Motherboard to operate as a part.2. HALHAL layer: If multiple applications requiring soundcard for example, then HAL provides abstraction for accessing the soundcard atsame time.Uses:- It provides an abstraction from HW access.- So, the application developer no need to focus on HW specific aspects. He can work on only, how to write application for HAL.- HAL will take care of HW usage via Driver.3. Application Interface and Application Peripheral Interface?- Its an another layer in SW system. In order to get services like Amazon, Twitter, etc,. in our system, we need APIs.4. Purpose of Drivers? without driver cant we access hardware directly?- Its a layer between HAL and HW. To ease the application programs.- If application wants to access HW(Memory) for writing and reading data- User can send write() or read() function, that is enough.- Driver specific to HW(memory) will handle the functions- Inside Driver-> Register Access will occur5. Inline Assembly coding- When it will be used better other than low level coding?Actually, the q is wrong. In what situation, Inline Assembly helps to optimize the code written in C.Examples needed?6. What is Host in BLE?Examples needed?Need ur support and corrections in above understanding.

author: niconiconi
author_rank: Frequent Contributor
timestamp: June 01, 2022, 11:02:34 am
content: QuoteBasically correct.QuoteBasically correct.QuoteThis is not wrong (it describes why would one use a "web API"), but it missed the point. API in the broadest sense, is a set of standards and conventions that specify how a software module can be accessed/used by a programmer from another part of the system. Examples: if its purpose is to create a process, read or write a file, it's an operating system API ("Win32 API" is a well-known example), if its purpose is sending a post to Twitter via HTTP, it's a type of "web API".

author: PlainName
author_rank: Super Contributor
timestamp: June 02, 2022, 04:57:28 pm
content: QuoteI would say that the HAL is nothing to do with multiple access (that would be the responsibility of the driver/API). The HAL is simply a hardware abstraction layer, so it provides a simplified paradigm for higher layers to deal with. For instance, where the setting of some pin may involve a series of register accesses using bit masks to isolate the pin, the HAL would provide what looks like a pin that can be set on or off.

author: RJSV
author_rank: Super Contributor
timestamp: June 03, 2022, 02:22:39 am
content: I can respond a little, but please also heed the advice coming from others. I think maybe what is needed from you is a circular, go study an item or two on your list, and, best of all, is when you can come back in with a specific question, and describing where you've gotten snagged on some detail.Proceeding that way, you can keep your FOCUS; meanwhile you can, periodically, bring your questions.Especially details, about where you've gotten stuck.No such thing as a stupid question, according to variable skill level.Anyway, I think the coding term 'In-line' refers to little (usually brief) lines of code, that allow quick, simple, and very direct action. Often that's just one single action that, is either doing very fast/brief, or doing something the high level language cannot.Maybe not some simple thing, like 'bit-shift', but more like a 'Force Parity Error' diagnostic command, that isn't implemented in the actual host language.Probability that the above is correct,...maybe 57%.

author: sadasivamASK
author_rank: Contributor
timestamp: June 03, 2022, 05:50:23 am
content: Hi,Yes.QuoteI will come up with suitable situations. Thanks for all ur support in this. Understanding wise, I haven't able to get these points, thatswhy i queried this kind of q's. Now, its okay i got clarity.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: June 03, 2022, 04:52:08 pm
content: You seem to have gotten the concept generally right.The specific meaning will depend on context and time.Take module for example. Once upon a time the US military though to reduce inventory and logistics problem through implementation of standard electronic modules which they cleverly called SEMs. These were incredible simple and might include a single flip flop of a high power PNP-NPN transistor pair.To the designer of urban transportation systems an automobile, a cloverleaf highway intersection, a bridge, a light rail system and an airport might all be considered modules.

author: sadasivamASK
author_rank: Contributor
timestamp: June 07, 2022, 04:11:08 am
content: Yeah @Catelina. Now, its understandable. Thanks for sharing examples.

author: niconiconi
author_rank: Frequent Contributor
timestamp: June 07, 2022, 06:19:56 am
content: Speaking of inline assembly (i.e. mixing assembly code in the middle of a high-level language like C), in my experience the common use cases are:1. Performance-critical Code. If 90% of your CPU time is spent on an algorithm that must be as fast as possible, it makes sense to rewrite it (or at least the critical inner loop) in assembly. Example: encryption/decryption, compression/decompression, encoding/decoding for images and videos. I have first-hand experience about how cryptography programmers go to great lengths at removing even the last possible CPU cycle from the code, often with extremely convoluted techniques (for starter,https://cryptojedi.org/peter/teaching/ce2020/multiprecision.pdffor example).2. Code with predictable timings, especially when programming small microcontrollers. For example, when bit-banging GPIO ports or handling interrupt requests, sometimes the operation must be completed within a few microseconds, or,exactlyn microseconds. In high-level languages it's often not guaranteed, but in raw assembly you know exactly how many CPU cycles is spent on each instructions (though the situation is much more complicated on modern pipelined, out-of-order CPUs).3. Directly accessing CPU instructions and registers not available in the high-level language. When you need to call a special instruction or access a register specific to a processor, sometimes it's only possible in assembly (other times, the C compiler has extensions or "Intrinsic Functions", allowing you to access them in C, but even then, assembly is sometimes still more comfortable to work with).