MSc EE, been designing/programming embedded systems for 30+ years. Experienced with Linux, never used Windows. Worked on various fields, from medical through industrial control to building automation and more. Expert level knowledge of C and ARM 4T/6M/7M assembly. In the last 10+ years almost exclusively worked with ARM core based MCUs. Before that used to work with Z80, 68HC11, AVR and M68K as well. FPGA design in Verilog, mainly Xilinx using ISE. Schematics entry and PCB design with Eagle.

Re: Embedded C - Linking obj file

Reply posted 2 weeks ago (11/12/2020)
Usuallylinkers use object files in their entirety. If you want selective linking, split myFunc.c into the separate functions, myFunc1.c, myFunc2.c and so on, compile...

Re: RMS calculation over one cycle 50/60Hz

Reply posted 1 month ago (10/16/2020)
If you sample by 6kHz, then your sample rate actually is an integer multiple of both 50Hz (6000/50=120) and 60Hz (6000/60=100).The mains frequency is usually changing...

Re: SPI Signal

Reply posted 1 month ago (10/13/2020)
Considering that SPI needs 4 signals plus ground, a 40-lane flat cable is not a very likely choice. Even if every second lane is GND, and a few used to deliver power,...

Re: So, You Want to be an Engineering Manager?

Reply posted 2 months ago (10/03/2020)
There's a quite interesting book on the subject. It's old, but still, every bit of it still stands. It's "Peopleware" by Timothy Lister & Tom DeMarco. It is...
Well, ARM has many instruction sets. There was the original 32-bit ARM ISA. Then, for embedded systems they came up with a more code-space efficient limited subset,...
While I agree that learning a 32-bit uC coming from an 8-bit background might be steep, it's not really the core that makes it hard. It's just what surrounds it....
MIPI DSI is a specification to delivers video (and configuration) data with high-speed differential signalling. I doubt that an 8-bit PIC could do it. An ARM based...

Re: Energy managment

Reply posted 3 months ago (08/25/2020)
As it was said before, you need to work out a power budget. Random charging is not necessarily a battery killer. What you need to consider, though, is that batteries...

Custom LCD

New thread started 4 months ago
For a scientific project I'd need a linear polariser where I can control the polarisation angle on a pixel by pixel basis.My idea is to use an LCD, with only one...

Re: When is a State Machine not a State Machine?

Reply posted 4 months ago (07/20/2020)
Well, I think you can call it a state machine, if you really want, but it's a bit of a stretch. It's a state machine as much as thisfor ( int i = 0 ;; i = ( i +...

Re: AT45DB641E dataflash

Reply posted 4 months ago (07/17/2020)
I would look into the driver source code. 16000 is a very human number, not a computer one. So it is unlikely that it is bits being chopped off or anything like...

Re: How Can Hairy Global Variable be Hidden Away?

Reply posted 4 months ago (07/14/2020)
The other way around, extern const. The order is important; if you use const extern the compiler will complain. The keywords extern, register, static and auto are...

Re: How Can Hairy Global Variable be Hidden Away?

Reply posted 4 months ago (07/13/2020)
Well, the const keyword is a bit of a misleading thing. If you read the C standard it turns out that the const keyword means the following, not more, not less:"I...

Re: How Can Hairy Global Variable be Hidden Away?

Reply posted 4 months ago (07/13/2020)
Two comments, apart from the 'extern' business that "hodgec" has already told you.1. You are wasting space. You store 1 bit in one byte. You could store all the...

Re: STM32H747 GPIO access by two cores

Reply posted 5 months ago (07/07/2020)
Yes, it is true for all pins and all peripheral modules.

Re: STM32H747 GPIO access by two cores

Reply posted 5 months ago (07/07/2020)
I mean, you don't need to do anything.The peripherals don't share pins. Each pin can be used by one and only one peripheral at the time, including the GPIO. When...

Re: STM32H747 GPIO access by two cores

Reply posted 5 months ago (07/07/2020)
If the I2C is done by an I2C module on the chip, then you need to do nothing. The granularity of the GPIO is indeed port-width. However, when a pin is assigned...

Re: To Cast, or Not to Cast

Reply posted 5 months ago (06/26/2020)
Well, your example contains these:(uint32_t) (red << 16)where red is int. What you told the compiler was 'shift the signed int red by 16 bits then convert...

Re: failure to wake up LPC2148 from power down mode

Reply posted 6 months ago (05/31/2020)
no wht m sayn iz that when the chip wakes up u shud set pll and pincon and pindir and all aftr PCON=2 instead of ISR cos thats where execution will continue after...

Re: failure to wake up LPC2148 from power down mode

Reply posted 6 months ago (05/30/2020)
The power-down mode does not call the IRQ handler when it wakes up, in fact interrupts can be disabled both on the CPU and the VIC. You need to enable the wake up...

Re: Is char signed/unsigned and is >> on signed defined?

Reply posted 6 months ago (05/28/2020)
Yes, you are right. UB cannot be warned against enough times.There is implementation defined behaviour, which is something that the standard leaves to the compiler...

Re: Is char signed/unsigned and is >> on signed defined?

Reply posted 6 months ago (05/27/2020)
> ISO/POSIX C at least guarantees a char is 8 bits todayWell, I wouldn't be that sure of that:An object declared as type char is large enough to store any member...

Re: Is char signed/unsigned and is >> on signed defined?

Reply posted 6 months ago (05/27/2020)
That should not be the case. The C standard says that the result of an integer division must be "the algebraic quotient with any fractional part discarded" and...

Re: Is char signed/unsigned and is >> on signed defined?

Reply posted 6 months ago (05/27/2020)
The answer is the C standard...Char can be signed or unsigned, depending on the compiler. You can force it either way by declaring the variable signed char or unsigned...
Depends on the chip. First, the bus width is one thing, but the internal architecture is an other. Back in the old days the 8088 was pretty much an 8086 with an...
It is up to the compiler to name your variables any way it likes. As long as it is doing it in a consistent manner, the same compiler generated name will refer to...

Re: STM MCU for GPS Tracker

Reply posted 7 months ago (04/20/2020)
As beningjw said. Forget the 8-bit chips. The ARM core based 32 bits chips can be sent to really low power consumption mode and they are just so much simpler to...

Re: USB composite device with Cortex M

Reply posted 8 months ago (03/30/2020)
It does not depend on the microcontroller. The USB controller on the chip gives you the physical transfer capability, everything above that is your firmware. The...
I'm not familiar with this particular chip, nor with the cubemx framework, but I often work with other STM32 chips On those, to configure the RTC (and some of the...

Re: Wireless Connectivity Options for Embedded Systems

Reply posted 8 months ago (03/12/2020)
I would add a column regarding the access to the protocol. 802.15.4 or BTLE are open standards but for example IQMESH has no publicly available protocol documentation...

Re: Rolling over before reaching 256 (8051)

Reply posted 10 months ago (02/08/2020)
Take a look at either uuencode or base64. They both transform a 3-byte (i.e. 24-bit) block to 4 bytes where all 4 bytes are printable ASCII characters.uuencode has...

Re: Has anyone seen this GCC compiler behavior before?

Reply posted 10 months ago (01/19/2020)
Yes, you are completely correct.A lot of people does not seem to know how positively evil the C standard is regarding undefined behaviour.Undefined behaviour basically...
Are you sure that the other memory chips have their addresses set correctly?
Do you have one or more spare port pin(s) to which you can put a scope?You could toggle them every time you enter and leave the ISR and also every time you enter...
A possible issue is that in your ISR you have the following:ISR() {     if ( ( IRQ_source_reg & 0x0e ) == 0x04 ) {         process_receive_char;...

Re: Looking for better touchscreen displays.

Reply posted 11 months ago (01/02/2020)
Take a look at the FT81x chips from FTDI (more precisely, the FTDI spin-off Bridgetek). They are quite interesting.The chip does not have a frame buffer, but it...
For a simple AVR micro that you possibly just use for hobby projects you probably don't need a bootloader. Burn the chip and that's it.But if you develop a system...

Re: LPC2148 UART0 and UART1

Reply posted 1 year ago (11/13/2019)
1. Check the power, the state of the reset pin and as @hodgec pointed out, the state of the ISP pin.2. If it's all good, check that your code is actually running....

Re: Industrial RS485 converters

Reply posted 1 year ago (10/05/2019)
Driving the wire on its own is not a major issue. Of course you need proper impedance matching termination at both ends. You will have a limited data rate; maybe...
As mr_bandit suggested, a scope would definitely help.An other thing that you might consider is to check whether after StartConversion() the SPI becomes busy or...

Re: NOR Flash as mass storage with cortex M Series.

Reply posted 1 year ago (06/28/2019)
PDF is a bit more complex than HTML. PDF has its roots in PostScript. PS is a full-blown stack based language, Turing complete an all. That is very cool, because...

Re: general linux question about distro/kernel

Reply posted 2 years ago (03/15/2019)
Forget the distro for a second.The way Linux (and any unix system) boots is, roughly, the following:Bootloader gets loaded and startsIt loads the kernel and a very...
Software interrupt is an interrupt triggered by software. That is, the ISR is started not because some hardware requests a service but because you execute a special...
Well, for starters, when the RF module is powered down, you will receive a constant 0, which is a break condition. When you turn the power on, first the RF module's...
Most MOS FETs do not need 10+ V to do anything. In fact, many can be killed with that kind of gate voltage. There are many which fully open at less than 2.5V, some...
If I understand your circuit correctly, you use the transistor to short the power for the radio module and hope that you can find a resistor value for R2 that is...

Re: SSP DMA problem in ARM lpc2388

Reply posted 2 years ago (01/25/2019)
I can only repeat my suggestion: try to make your SD work with the SSP using interrupts. Until that works, forget the DMA. You will need to understand the SSP in...

Re: SSP DMA problem in ARM lpc2388

Reply posted 2 years ago (01/25/2019)
The 23xx series chips use the ARM DMA macroblock, which is notoriously hard to set up properly. In addition, you need to set up the SSP correctly, which, by the...
If your MCU runs at 22MHz, then you can't generate an output faster than 11MHz. The 74HC595 at 4.5V has a maximum clock frequency of 25MHz, so there's no problem...

Re: Stack - interrupt, function call?

Reply posted 2 years ago (01/05/2019)
Before the IRQ hits, you have a stack that looks like this:SP-> local data of the called function saved registers return address (and possibly a frame...

Re: Stack - interrupt, function call?

Reply posted 2 years ago (01/04/2019)
"THERE IS ONLY ONE STACK"I beg to differ.Even on very old CPUs, like the m68k you mentioned, there were two stack pointers, the USP and the SSP (user and supervisor...

Re: SPI communication

Reply posted 2 years ago (06/13/2018)
"So -the first byte from the slave is trash."Not necessarily. Some slaves put a status byte into the data register at the falling edge of the slave select. That's...

Re: Cooperative scheduling

Reply posted 2 years ago (06/04/2018)
I believe (but not sure, never been a Windows person) early Windows versions were co-operative as well. I mean before W95, like 3.x and earlier. When I saw Win 1.0...

Re: Cooperative scheduling

Reply posted 2 years ago (06/03/2018)
Well, the Commodore Amiga had a pre-emptive kernel, but bad applications still ended in Guru Meditation, as there was no memory protection. You could not hog the...

Cooperative scheduling

New thread started 2 years ago
Recently there was a discussion about RTOS vs. bare-metal on this forum.I happen to work with embedded systems which are somewhere in the middle. They are not tiny,...

Use this form to contact Kocsonya

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address