What happens when an ISR is running and another interrupt happens?

Normally, an interrupt service routine proceeds until it is complete without being interrupted itself in most of the systems. However, If we have a larger system, where several devices may interrupt the microprocessor, a priority problem may arise. If you set the interrupt enable flag within the current interrupt as well, then you can allow … Read more

Does it matter which microcontroller to use for 1st time embed system programmer?

Personally, I’d recommend an ARM Cortex-M3 based microcontroller. The higher-power ARM cores are extremely popular, and these low-power versions could very well take off in a space that is still littered with proprietary 8/16-bit cores. Here is a recent article on the subject: The ARM Cortex-M3 and the convergence of the MCU market. The Arduino … Read more

How do you design a serial command protocol for an embedded system? [closed]

I have some preferences (and pet peeves) from writing software to control media and display devices using RS232. Depending on your hardware, some of these may not apply: I think it’s a good idea to make your protocol more friendly for automation. If you need an interactive interface (command line or other), build it separately … Read more

Embedded systems worst practices?

Uninitialized exception vectors (you know, for the ones that “will never be reached”) Say it with me: Global variables. Especially ones shared between ISRs and tasks (or foreground loops) without protection. Failure to use “volatile” where necessary. Having routines that DisableInterrupts() and then EnableInterrupts() paired up. Got that? Not RestoreInterrupts(), but ENABLE. Yeah, nesting. No … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)