3 Common C Language Techniques in Embedded Development

3 Common C Language Techniques in Embedded Development

1. Register Operations In embedded development, it is often necessary to manipulate registers, performing operations such as writing and reading. Each register has its inherent address, making it particularly important to access these addresses using C language. #define GSTATUS1 (*(volatile unsigned int *)0x560000B0) Here, we provide an example. This is a macro definition for a … Read more

How to Determine If Cortex-M Processor Is Executing Interrupt Function?

How to Determine If Cortex-M Processor Is Executing Interrupt Function?

Follow+Star Public Account, don’t miss wonderful content Author | strongerHuang WeChat Official Account | Embedded Column Today, I want to share some knowledge I encountered while debugging code: the usage of __get_CONTROL, and the differences between xQueueSend and xQueueSendFromISR; 1 Source of the Problem I previously ported some code written by others on the FreeRTOS … Read more